/*
 * Paleta de Colores:
 * Base: Blanco (#FFFFFF) y Negro (#000000 / #212529)
 * Primario (Azul Frío Pastel): #6699CC (Para la maquetación, usaré un tono ligeramente más vibrante para el CTA, como #3C8CE7, y el azul oscuro del logo para el fondo del nav)
 * Fondo de Secciones: #F8F9FA (Gris muy claro)
 */

:root {
    --primary-color-blue: #3C8CE7;
    /* Azul Vibrante para CTA */
    --primary-color-dark: #1A374D;
    /* Azul Oscuro del logo/Nav */
    --secondary-color-light: #F8F9FA;
    /* Gris Claro para fondos */
    --cta-blue: #2670C9;
    /* Azul de botones: contraste suficiente con texto blanco */
    --pastel-blue-light: #9BB8D0;
    /* Tono pastel de la gama */
    --font-family-base: 'Poppins', sans-serif;
}

/* Prevenir scroll horizontal */
html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    color: #212529;
    /* Negro ligeramente suave */
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Asegurar que todos los elementos no excedan el ancho de la pantalla */
* {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Márgenes y espacios de aire consistentes */
.container,
.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 576px) {
    .container,
    .container-fluid {
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (min-width: 992px) {
    .container,
    .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* --- NAV BAR --- */

.navbar {
    background-color: var(--primary-color-dark);
    /* Fondo del nav en azul oscuro */
    transition: background-color 0.3s ease;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
}

.navbar .container-fluid {
    max-width: 100%;
}

.navbar .navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Logo del navbar */
.navbar .navbar-brand img {
    max-width: 35px;
    height: auto;
}

@media (min-width: 768px) {
    .navbar .navbar-brand img {
        max-width: 40px;
    }
}

.logo-curly {
    color: var(--pastel-blue-light);
    /* Color similar al pastel del logo */
    font-size: 2rem;
    font-weight: 300;
    margin-right: 5px;
}

.logo-dev {
    color: var(--primary-color-blue);
}

.navbar .nav-link {
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.75rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estilo del botón de Contacto en el Nav */
.btn-primary-custom {
    background-color: var(--cta-blue);
    border-color: var(--cta-blue);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background-color: #1F5FA8;
    /* Tono más oscuro de azul */
    border-color: #1F5FA8;
    color: white;
}

.btn-outline-primary-custom {
    color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    font-weight: 600;
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary-color-dark);
    color: white;
}

.navbar .nav-link.btn-primary-custom {
    color: white;
}

.navbar .nav-link.btn-primary-custom:hover {
    background-color: #1F5FA8;
}

/* --- HERO SECTION --- */

.masthead {
    padding-top: calc(6rem + 56px);
    /* Espacio para el navbar fijo */
    padding-bottom: 6rem;
    /* Fondo oscuro para el efecto de 'banner' del logo negro */
    background-color: #0d0d0d;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 100"><defs><radialGradient id="g" cx="50%" cy="50%" r="60%" fx="50%" fy="50%"><stop offset="0%" style="stop-color:rgb(26, 55, 77, 0.8)" /><stop offset="100%" style="stop-color:rgb(13, 13, 13, 1)" /></radialGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');
    margin-bottom: 2rem;
}

.masthead .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* Logo animado del hero - Responsive */
.hero-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    /* Recorta el margen vacío del GIF para que el botón principal se vea sin desplazarse */
    aspect-ratio: 5 / 2;
    object-fit: cover;
    border-radius: 10px;
    background-color: #000;
}

@media (min-width: 576px) {
    .hero-logo img {
        max-width: 350px;
    }
}

@media (min-width: 768px) {
    .hero-logo img {
        max-width: 500px;
    }
}

@media (min-width: 992px) {
    .hero-logo img {
        max-width: 750px;
    }
}

@media (min-width: 1200px) {
    .hero-logo img {
        max-width: 850px;
    }
}

@media (min-width: 1400px) {
    .hero-logo img {
        max-width: 900px;
    }
}

.masthead-heading {
    font-size: 2.5rem;
    line-height: 1.2;
}

.masthead-subheading {
    font-size: 1.25rem;
    color: var(--pastel-blue-light);
}

@media (min-width: 992px) {
    .masthead {
        padding-top: calc(5rem + 56px);
        padding-bottom: 6rem;
    }

    .masthead-heading {
        font-size: 3.5rem;
    }

    .masthead-subheading {
        font-size: 1.5rem;
    }

    .hero-logo {
        margin-bottom: 2.5rem !important;
    }
}

.masthead-kicker {
    display: block;
    margin-bottom: 0.75rem;
    font-size: clamp(0.85rem, 2.5vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--pastel-blue-light);
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.78);
}

/* --- SECTIONS --- */

.page-section {
    padding: 5rem 0;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.page-section:first-of-type {
    margin-top: 0;
}

.page-section:last-of-type {
    margin-bottom: 0;
}

.page-section .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.page-section-heading {
    font-size: 2.25rem;
    color: var(--primary-color-dark);
    margin-bottom: 2.5rem;
}

/* Sección de Misión (fondo azul) */
.bg-light-blue {
    background-color: var(--primary-color-dark);
    color: white;
}

.mission-icon {
    font-size: 3rem;
    color: var(--primary-color-blue);
    margin-bottom: 1rem;
}

/* Testimonios */
.testimonial-card {
    background-color: white;
    border: 1px solid var(--pastel-blue-light);
    border-top: 5px solid var(--primary-color-blue);
    border-radius: 8px;
    min-height: 180px;
}

/* --- CONTACT FORM --- */

/* Contact Section */
.contact {
    background-color: #f1f1f1;
    padding: 5rem 0;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.contact .container {
    padding-left: 20px;
    padding-right: 20px;
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact input,
.contact textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
}

.contact textarea {
    height: 150px;
    resize: vertical;
}

/* Cloudflare Turnstile Widget */
.cf-turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.cf-turnstile {
    transform-origin: center;
}

/* Responsive para mobile */
@media (max-width: 576px) {
    .cf-turnstile {
        transform: scale(0.85);
    }
}

#btn-submit {
    background-color: var(--cta-blue);
    border-color: var(--cta-blue);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 2em;
    border: 2px solid var(--cta-blue);
    cursor: pointer;
}

#btn-submit:hover {
    background-color: #316BB0;
    border-color: #316BB0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60, 140, 231, 0.3);
}

#btn-submit:active {
    transform: translateY(0);
}

/*
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #1f2e6e;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2em;
}

/* --- FOOTER --- */
.footer {
    background-color: #212529;
    /* Fondo oscuro */
    color: white;
    margin-top: 2rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.footer .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* Logo del footer - Responsive */
.logo-footer img {
    max-width: 120px;
    height: auto;
}

@media (min-width: 576px) {
    .logo-footer img {
        max-width: 150px;
    }
}

@media (min-width: 992px) {
    .logo-footer img {
        max-width: 220px;
    }

    .footer-year {
        text-align: center !important;
    }
}

@media (min-width: 1200px) {
    .logo-footer img {
        max-width: 260px;
    }
}

.footer .logo-curly,
.footer .logo-dev {
    color: white;
    /* Cambiar colores para contraste */
}

.footer .logo-curly {
    color: var(--pastel-blue-light);
}

.footer a {
    color: var(--pastel-blue-light);
}

.footer .text-footer a {
    color: inherit;
    text-decoration: none;
}

.footer .text-footer a:hover {
    text-decoration: underline;
}

.footer a:hover {
    color: var(--primary-color-blue);
}

.btn-social {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.btn-social:hover {
    background-color: var(--primary-color-blue);
    color: white;
}

/* --- WHATSAPP CTA FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    /* Verde WhatsApp */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Media Query para Mobile (Asegurar buena experiencia) */
@media (max-width: 768px) {
    /* Reducir padding en mobile pero mantener espacios de aire */
    .page-section {
        padding: 3rem 0;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .masthead {
        padding-top: calc(4rem + 56px);
        padding-bottom: 4rem;
        margin-bottom: 1.5rem;
    }

    .masthead .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .contact {
        padding: 3rem 0;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer {
        margin-top: 1.5rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Márgenes laterales más pequeños en mobile */
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* NAVBAR MOBILE - Logo a la izquierda, hamburguesa a la derecha */
    .navbar .container-fluid {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-brand {
        margin-bottom: 0;
    }

    .navbar-toggler {
        margin-top: 0;
        margin-left: auto;
    }

    .navbar-collapse {
        background-color: var(--primary-color-dark);
        /* Fondo para el menú expandido */
        padding: 1rem 0;
        text-align: center;
        width: 100%;
    }

    .navbar .nav-link {
        padding: 0.5rem 1rem;
        text-align: center;
    }

    .navbar-nav {
        align-items: center;
    }

    /* FOOTER MOBILE - Centrado y en columna */
    .footer .row {
        text-align: center !important;
    }

    .footer .col-lg-4 {
        text-align: center !important;
        margin-bottom: 1.5rem;
    }

    .footer .text-lg-start,
    .footer .text-lg-end {
        text-align: center !important;
    }

    /* HERO SECTION - Centrado */
    .masthead .container {
        text-align: center;
    }

    .hero-logo {
        display: flex;
        justify-content: center;
    }

    /* SECCIONES - Todo centrado en mobile */
    .page-section .container {
        text-align: center;
    }

    .page-section .row {
        justify-content: center;
    }

    /* IMÁGENES - Ajustes adicionales para mobile */
    .hero-logo img {
        max-width: 280px;
    }

    .navbar .navbar-brand img {
        max-width: 30px;
    }

    .logo-footer img {
        max-width: 180px;
    }

    .navbar .navbar-brand {
        font-size: 1.5rem;
    }
}

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-content i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.modal-content h3 {
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.modal-close-btn {
    background-color: var(--cta-blue);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
    background-color: #316BB0;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =================================================================
   CARDS DE PROYECTOS
   ================================================================= */

.project-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 2px 6px rgba(26, 55, 77, 0.08), 0 8px 24px rgba(26, 55, 77, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card-media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--primary-color-dark);
}

.project-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.5rem;
}

.project-card-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-card-open {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--primary-color-dark);
    text-align: left;
}

/* El botón cubre toda la card */
.project-card-open::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}

.project-card-open:focus-visible {
    outline: none;
}

.project-card:has(.project-card-open:focus-visible) {
    outline: 3px solid var(--primary-color-blue);
    outline-offset: 3px;
}

.project-card-text {
    color: #5a6673;
    margin-bottom: 1rem;
}

.project-card-more {
    margin-top: auto;
    font-weight: 600;
    color: #316BB0;
}

.project-card-more i {
    margin-left: 0.35rem;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 40px rgba(26, 55, 77, 0.22);
    }

    .project-card:hover .project-card-media img {
        transform: scale(1.06);
    }

    .project-card:hover .project-card-more i {
        transform: translateX(6px);
    }
}

.project-card.is-expanded {
    visibility: hidden;
}

/* =================================================================
   MODAL DE PROYECTOS
   ================================================================= */

/* Evita que la página "salte" al ocultar la barra de desplazamiento */
html {
    scrollbar-gutter: stable;
}

html.modal-open,
html.modal-open body {
    overflow: hidden;
}

.project-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.project-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-dialog::backdrop {
    background: transparent;
}

.pd-scrim {
    position: fixed;
    inset: 0;
    background: rgba(9, 20, 29, 0.86);
}

.pd-panel {
    position: relative;
    width: min(860px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.pd-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pd-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: var(--primary-color-dark);
    color: white;
    font-size: 1.25rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.pd-close:hover {
    background: #316BB0;
    transform: rotate(90deg);
}

.pd-media {
    width: 100%;
    background-size: cover;
    background-position: center;
}

.pd-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-flyer {
    position: fixed;
    background: white;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.pd-flyer > div {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
}

.pd-flyer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.pd-body {
    padding: 2rem 2.5rem 2.5rem;
}

.pd-title {
    font-size: 2rem;
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
}

.pd-title:focus {
    outline: none;
}

.pd-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
}

.pd-features {
    background: var(--secondary-color-light);
    border-left: 4px solid var(--primary-color-blue);
    padding: 1.75rem;
    border-radius: 12px;
}

.pd-features h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
}

.pd-features h3 i {
    color: var(--primary-color-blue);
}

.pd-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pd-features li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.65rem 0;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.pd-features li:last-child {
    border-bottom: none;
}

.pd-features li i {
    color: var(--primary-color-blue);
}

.pd-cta {
    text-align: center;
    padding-top: 2rem;
}

.pd-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #316BB0 0%, var(--primary-color-dark) 100%);
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pd-cta-button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(49, 107, 176, 0.4);
}

@media (max-width: 768px) {
    .project-dialog {
        padding: 0;
        height: 100dvh;
    }

    .pd-panel {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .pd-body {
        padding: 1.5rem 1.25rem 2rem;
    }

    .pd-title {
        font-size: 1.5rem;
    }

    .pd-description {
        font-size: 1rem;
    }

    .pd-features {
        padding: 1.25rem;
    }

    .pd-cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .project-card,
    .project-card-media img,
    .project-card-more i,
    .pd-close,
    .pd-cta-button {
        transition: none;
    }

    .project-card:hover,
    .project-card:hover .project-card-media img,
    .pd-close:hover {
        transform: none;
    }
}

/* =================================================================
   FREESOFT
   ================================================================= */

/* Al llegar desde otra página, la sección no queda tapada por el menú */
#quienes-somos,
#mision,
#trabajos,
#contacto {
    scroll-margin-top: 66px;
}

.freesoft-page {
    background: var(--secondary-color-light);
}

.freesoft-hero {
    padding: calc(56px + 3rem) 0 3rem;
    background: radial-gradient(circle at 50% 30%, var(--primary-color-dark) 0%, #0d0d0d 100%);
    color: white;
}

.freesoft-hero h1 {
    font-size: clamp(2rem, 6vw, 3.25rem);
}

.freesoft-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.82);
}

.app-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.app-breadcrumb a {
    color: var(--pastel-blue-light);
}

.app-cover {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.freesoft-section {
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.freesoft-section h2 {
    font-size: 1.6rem;
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
}

.freesoft-section h3 {
    font-size: 1.15rem;
    color: var(--primary-color-dark);
}

.freesoft-section section,
.app-notice {
    margin-bottom: 2.5rem;
}

.freesoft-section li {
    margin-bottom: 0.5rem;
}

.freesoft-note {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #5a6673;
}

.app-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26, 55, 77, 0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.app-card-media {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.app-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.freesoft-section .app-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.app-card h2 a {
    color: inherit;
    text-decoration: none;
}

.app-card .app-meta {
    margin-top: auto;
}

.app-card-more {
    margin-top: 1rem;
    font-weight: 600;
    color: #2670C9;
    text-decoration: none;
}

.app-meta {
    font-size: 0.9rem;
}

.app-meta div {
    display: flex;
    gap: 0.5rem;
}

.app-meta dt {
    font-weight: 600;
    color: var(--primary-color-dark);
}

.app-meta dt::after {
    content: ':';
}

.app-meta dd {
    margin: 0;
    color: #4a5568;
}

.app-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.text-center .app-actions {
    justify-content: center;
}

.app-actions .btn {
    padding: 0.65rem 1.4rem;
}

.app-actions .btn:disabled {
    background: #5a6673;
    border-color: #5a6673;
    color: white;
    opacity: 1;
}

.download-count {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border: 2px solid currentColor;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #2670C9;
    background: white;
}

.download-count[hidden] {
    display: none;
}

.app-shots {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
}

.app-shots a {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.app-shots img {
    height: 380px;
    width: auto;
    max-width: 85vw;
    object-fit: contain;
    border: 1px solid #dde3ea;
    border-radius: 12px;
    background: white;
}

.app-notice {
    background: white;
    border-left: 5px solid #c98a00;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.app-notice p:last-child {
    margin-bottom: 0;
}

@media (hover: hover) {
    .app-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 40px rgba(26, 55, 77, 0.2);
    }
}

@media (max-width: 576px) {
    .app-shots img {
        height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card {
        transition: none;
    }

    .app-card:hover {
        transform: none;
    }
}

/* --- PÁGINA 404 --- */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at center, #1A374D 0%, #0d0d0d 75%);
}

.error-page img {
    width: 80px;
}

.error-code {
    font-size: clamp(5rem, 22vw, 9rem);
    font-weight: 700;
    line-height: 1;
    margin: 1rem 0;
    color: var(--primary-color-blue);
}
