/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors */
    --clr-primary: #4F46E5;
    /* Indigo/Purple Modern */
    --clr-primary-dark: #4338ca;
    --clr-secondary: #0F172A;
    /* Slate 900 */
    --clr-text-main: #334155;
    /* Slate 700 */
    --clr-text-light: #64748B;
    /* Slate 500 */
    --clr-light: #F8FAFC;
    /* Slate 50 */
    --clr-white: #ffffff;
    --clr-bg-alt: #F1F5F9;

    /* Fonts */
    --ff-primary: 'Outfit', sans-serif;

    /* Spacing */
    --container-width: 1100px;
    --section-padding: 4rem 1.5rem;
    --header-height: 70px;

    /* Border Radius */
    --radius: 8px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-primary);
    color: var(--clr-white);
    line-height: 1.6;
    background: linear-gradient(135deg, #ad0562 0%, #0a4ecc 100%);
    min-height: 100vh;
    padding-top: var(--header-height);
    /* Offset for fixed header */
}

ul {
    list-style: none;
}

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

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.section__title {
    font-size: 2rem;
    color: var(--clr-white);
    margin-bottom: 2rem;
    font-weight: 700;
}

.section__title--center {
    text-align: center;
}

.section__description {
    margin-bottom: 1.5rem;
    color: var(--clr-light);
    font-size: 1.15rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--clr-primary);
    color: var(--clr-white);
}

.btn--primary:hover {
    background-color: var(--clr-primary-dark);
}

.btn--outline {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

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

.btn--full {
    display: block;
    width: 100%;
    text-align: center;
}

/* Placeholder Images */
.placeholder-image {
    background-color: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--clr-text-light);
    font-weight: 600;
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
    background-color: #ede2c2;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-secondary);
}

.logo__highlight {
    color: var(--clr-primary);
}

.nav-toggle {
    display: block;
    /* Visible by default on mobile */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--clr-secondary);
}

/* Mobile Nav Styles */
.nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--clr-white);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Hidden by default on mobile */
    display: none;
}

.nav.is-open {
    display: block;
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.nav__link {
    font-weight: 600;
    color: var(--clr-text-main);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--clr-primary);
}

.nav__link--cta {
    color: var(--clr-primary);
    font-weight: 700;
}

/* =========================================
   HERO SECTION
   ========================================= */
/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 2rem 1.5rem;
    background-color: transparent;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero__container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    /* Asegurar altura */
}

.hero__image-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.18);
    width: 90%;
    height: 100%;
    max-height: 700px;
    border-radius: 4rem;
    /* Bordes suaves redondeados */
    overflow: hidden;
    z-index: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12.5%, black 87.5%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 12.5%, black 87.5%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 12.5%, black 87.5%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 12.5%, black 87.5%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Oscurecer para legibilidad */
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero__subtitle {
    display: block;
    color: var(--clr-white);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    display: inline-block;
}

.hero__subtitle:hover {
    color: var(--clr-primary);
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(79, 70, 229, 0.6);
}

.hero__title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--clr-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero__title--highlight {
    color: var(--clr-white);
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0 0.5rem;
    cursor: default;
}

/* Efecto interactivo solicitado */
.hero__title--highlight:hover {
    color: var(--clr-primary);
    /* Color destacado */
    transform: scale(1.1);
    /* Agrandar ligeramente */
    text-shadow: 0 0 20px rgba(79, 70, 229, 0.6);
}

.hero__description {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about__container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about__image {
    width: 100%;
    height: 380px;
    object-fit: cover !important;
    object-position: center 20%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services {
    background-color: transparent;
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--clr-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.service-card__icon {
    font-size: 2.5rem;
    color: var(--clr-primary);
    margin-bottom: 1.5rem;
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--clr-secondary);
}

.service-card__description {
    color: var(--clr-text-light);
    font-size: 0.95rem;
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact__container {
    display: grid;
    gap: 3rem;
}

.contact__details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--clr-white);
}

.contact__details i {
    color: var(--clr-primary);
    width: 20px;
}

.contact__form {
    background-color: var(--clr-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--clr-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    resize: vertical;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: var(--clr-secondary);
    color: var(--clr-white);
    padding: 2rem 0;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer__logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer__copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer__social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #94a3b8;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--clr-white);
}

/* =========================================
   MEDIA QUERIES (DESKTOP)
   ========================================= */
@media (min-width: 768px) {
    .section__title {
        font-size: 2.5rem;
    }

    .header__container {
        padding: 0 2rem;
    }

    .nav-toggle {
        display: none;
    }

    .nav {
        display: block;
        position: static;
        width: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav__list {
        flex-direction: row;
        gap: 2rem;
    }

    .nav__link--cta {
        background-color: var(--clr-primary);
        color: var(--clr-white);
        padding: 0.6rem 1.2rem;
        border-radius: var(--radius);
    }

    .nav__link--cta:hover {
        background-color: var(--clr-primary-dark);
        color: var(--clr-white);
    }

    /* Desktop overrides if needed, but the new structure is pretty responsive by default. 
       We might want to adjust sizes for larger screens */
    .hero__title {
        font-size: 4rem;
    }

    .hero__image-container {
        width: 96%;
        /* Más estrecho en pantallas grandes para no ser tan ancho */
        height: 70vh;
    }

    .about__container {
        flex-direction: row;
        align-items: center;
    }

    .about__image-wrapper {
        flex: 1;
    }

    .about__content {
        flex: 1;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__container {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .footer__container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   SERVICE DETAIL PAGES
   ========================================= */

/* Service Hero Base */
.service-hero {
    position: relative;
    padding: var(--header-height) 1.5rem 4rem;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--clr-secondary);
    overflow: hidden;
}

.service-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.service-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.service-hero__icon {
    font-size: 3rem;
    color: var(--clr-white);
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.service-hero__title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--clr-white);
}

.service-hero__title .highlight {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(to right, #6EE7B7, #3B82F6);
    /* Default gradient */
}

.service-hero__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Specific Hero Variants */
.service-hero--responsive {
    background: linear-gradient(135deg, #4338ca 0%, #be185d 100%);
}

.service-hero--responsive .service-hero__title .highlight {
    background-image: linear-gradient(to right, #F472B6, #FCD34D);
}

.service-hero--seo {
    background: linear-gradient(135deg, #064e3b 0%, #1e40af 100%);
}

.service-hero--seo .service-hero__title .highlight {
    background-image: linear-gradient(to right, #34D399, #60A5FA);
}

.service-hero--apps {
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
}

.service-hero--apps .service-hero__title .highlight {
    background-image: linear-gradient(to right, #a78bfa, #f472b6);
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-text-main);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-back:hover {
    transform: translateX(-5px);
    color: var(--clr-primary);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Service Detail Section */
.service-detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

.service-detail__text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--clr-white);
}

.service-detail__text p {
    margin-bottom: 1.5rem;
    color: #ede2c2;
    font-size: 1.1rem;
}

.features-list {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.feature-item i {
    color: var(--clr-primary);
    margin-top: 0.25rem;
}

.feature-cta {
    margin-top: 2.5rem;
}

/* Visual Elements */
.service-detail__visual {
    display: flex;
    justify-content: center;
}

.code-window,
.device-mockup,
.seo-score {
    width: 100%;
    max-width: 500px;
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* Code Window */
.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #22c55e;
}

pre {
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

.keyword {
    color: #c084fc;
}

.variable {
    color: #f472b6;
}

.string {
    color: #a78bfa;
}

.key {
    color: #60a5fa;
}

.comment {
    color: #64748b;
    font-style: italic;
}

/* Device Mockup */
.device-mockup {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 3rem;
    align-items: flex-end;
}

.device-icon {
    font-size: 4rem;
    color: var(--clr-primary);
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.device-icon:hover {
    transform: translateY(-10px);
}

.device-icon:nth-child(2) {
    font-size: 3rem;
}

.device-icon:nth-child(3) {
    font-size: 2rem;
}

/* SEO Score */
.seo-score {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid #22c55e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #22c55e;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.score-circle span {
    font-size: 3rem;
    line-height: 1;
}

.score-circle small {
    font-size: 0.8rem;
    color: #64748b;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Kanban Mockup */
.kanban-mockup {
    display: flex;
    gap: 1rem;
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 500px;
}

.kanban-column {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-column-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kanban-card {
    background: #1e293b;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    border-left: 3px solid #64748b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
}

.kanban-card--progress {
    border-left-color: #3b82f6;
}

.kanban-card--done {
    border-left-color: #10b981;
    text-decoration: line-through;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .service-detail__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================
   PROJECTS PAGE STYLES
   ========================================= */

.projects-hero {
    position: relative;
    padding: var(--header-height) 1.5rem 4rem;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    overflow: hidden;
}

.projects-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(173, 5, 98, 0.8) 0%, rgba(10, 78, 204, 0.8) 100%);
    z-index: 1;
    display: none;
}

.projects-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2rem;
}

.projects-hero__title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--clr-white);
}

.projects-hero__title .highlight {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(to right, #F59E0B, #FCD34D);
}

.projects-hero__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
    padding-top: 2rem;
    padding-bottom: 6rem;
}

.projects-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .projects-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .projects-wrapper {
        gap: 3.5rem;
    }
}

/* Project Card */
.project-card {
    background-color: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.project-card__image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background-color: #0f172a;
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card__image {
    transform: scale(1.05);
}

.project-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.project-card:hover .project-card__overlay {
    opacity: 1;
}

.btn--white {
    background-color: var(--clr-white);
    color: var(--clr-secondary);
    border: 2px solid var(--clr-white);
    padding: 0.6rem 1.4rem;
    font-weight: 700;
}

.btn--white:hover {
    background-color: transparent;
    color: var(--clr-white);
}

.project-card__info {
    padding: 1.5rem;
}

.project-card__category {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-card__title {
    font-size: 1.5rem;
    color: var(--clr-white);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.project-card__description {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .project-card__description {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   MODAL STYLES
   ========================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Slightly darker for focus */
    backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    z-index: 2001;
    width: 90%;
    max-width: 400px;
    /* Restrict width to mimic mobile feeling */
    max-height: 90vh;
    /* Don't overflow screen vertically */
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal__close:hover {
    transform: scale(1.1);
}

.modal__header {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--clr-white);
    display: none;
    /* Hidden requested by user 'solo la vista en mobile first' */
}

.modal__body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow-y: auto;
    /* Allow scrolling if image is very long */
    border-radius: 20px;
    /* Rounded corners for the 'device' feel */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar for modal */
.modal__body::-webkit-scrollbar {
    width: 6px;
}

.modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.modal__body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.mobile-frame {
    width: 100%;
    background: #000;
    border-radius: 20px;
    /* Match body radius */
    overflow: hidden;
    position: relative;
}

.mobile-frame__image {
    width: 100%;
    height: auto;
    display: block;
}

/* Custom Desktop/Tablet view layout for modal */
.modal.modal--desktop .modal__content {
    max-width: 900px;
    width: 95%;
}

.modal.modal--desktop .mobile-frame {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* =========================================
   LEGAL PAGES
   ========================================= */
.legal-page {
    background-color: var(--clr-bg-alt);
    min-height: calc(100vh - var(--header-height));
    color: var(--clr-text-main);
}

.legal-content {
    background-color: var(--clr-white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--clr-secondary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.legal-content p,
.legal-content ul {
    margin-bottom: 1rem;
    color: var(--clr-text-main);
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--clr-white);
}

/* =========================================
   COOKIE BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--clr-secondary);
    color: var(--clr-white);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    animation: slideUp 0.5s forwards 1s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.cookie-banner__content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cookie-banner__link {
    color: #cbd5e1;
    text-decoration: underline;
    font-size: 0.9rem;
}

.cookie-banner__link:hover {
    color: var(--clr-white);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .cookie-banner__content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}