* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Brown';
    src: url(font/brown-sugar.ttf);
    font-style: normal;
}

h2 {
    font-family: 'Brown';
}

body {
    min-height: 100vh;
    background-color: #FFFBF6;
}

.main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.about-me {
    height: 100vh;
    width: 100%;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    /* Spacing between the 3 photos */
    padding: 2rem;
    /* Spacing from screen borders */
    z-index: 1;
    /* Sits at the back */
}

/* Individual Vertical Card */
.hero-bg-item {
    flex: 1;
    max-width: 420px;
    /* Max width for each vertical column */
    height: 68vh;
    /* Optional: subtle rounded corners */
    overflow: hidden;
    opacity: 0;
    animation: photoFadeIn 1s ease forwards;
}

/* Staggered delay: Left -> Center -> Right */
.hero-bg-item:nth-child(1) {
    animation-delay: 0.3s;
    /* Left photo appears first */
}

.hero-bg-item:nth-child(2) {
    animation-delay: 0.9s;
    /* Center photo appears 1s after left */
}

.hero-bg-item:nth-child(3) {
    animation-delay: 1.3s;
    /* Right photo appears 1s after center */
}

/* Keyframes animation */
@keyframes photoFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.8;
    }
}

.hero-bg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.center-Title {
    position: relative;
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.brand-logo {
    font-size: 8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #083168;
    font-family: 'Brown';
}

.brand-byline {
    position: absolute;
    bottom: 3.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    white-space: nowrap;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #083168;
    font-weight: 400;
    text-align: center;
}

.main-logo {
    position: absolute;
    top: 1.7rem;
    left: 3rem;
    /* Spacing from the left edge */
    z-index: 3;
    /* Keeps it above the hero-bg-grid images */
    display: flex;
    align-items: center;
}

.main-logo img {
    height: 70px;
    /* Adjust size as needed */
    width: auto;
    object-fit: contain;
}

.brand-upperline {
    position: absolute;
    top: 3.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    white-space: nowrap;
    font-size: 1.7rem;
    letter-spacing: 2px;
    color: #7B4934;
    font-weight: 400;
    text-align: center;
}

.about-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.about-image {
    max-width: 30%;
}

.about-image img {
    margin-top: 10%;
    width: 100%;
    display: block;
}

.about-content,
.about-content-right {
    flex: 1;
    max-width: 30%;
    margin-top: 3%;
}

.about-content-right {
    margin-top: 14%;
}

.content-title {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #083168;
    font-family: 'Brown';
}

.content-title1 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #7d7d7d;
    text-transform: uppercase;
}

.content-title2 {
    font-size: 1rem;
    margin-bottom: 2px;
    color: #333;
    text-transform: uppercase;
}

.description {
    line-height: 1.6;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .split-hero {
        flex-direction: column;
        height: auto;
    }

    .split-hero-left,
    .split-hero-right {
        flex: none;
        width: 100%;
    }

    .split-hero-right {
        height: 50vh;
    }

    .brand-container {
        text-align: center;
        padding: 3rem 1rem;
    }

    .brand-logo {
        font-size: 2.5rem;
    }
}

/* Scroll Animation Styles */

.reveal {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Different animation delays for variety */

.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

.reveal-delay-3 {
    transition-delay: 0.6s;
}

/* Different animation directions */

.reveal-left {
    transform: translateX(-50px);
}

.reveal-left.active {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-right.active {
    transform: translateX(0);
}

.logo img {
    height: 100px;
    width: auto;
    border-radius: 50%;
    margin-top: 15%;
}

/* Projects Section Container */
.projects-section {
    padding: 6rem 4rem;
    background-color: #FFFBF6;
    max-width: 1500px;
    margin: 0 auto;
}

/* Header with Title and Subtitle */
.projects-header {
    display: flex;
    align-items: baseline;
    gap: 3rem;
    margin-bottom: 4rem;
}

.projects-main-title {
    font-family: 'Brown', 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #1a1a1a;
}

.projects-subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: #004AAD;
    font-weight: 400;
}

/* 4-Column Grid */
.projects-grid {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.projects-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    /* Spacing between vertical cards in the same column */
}

/* Offset columns 2 and 4 to create the staggered wave look */
.col-offset-1 {
    margin-top: 5rem;
}

.col-offset-2 {
    margin-top: 7rem;
}

/* Individual Card Styling */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #222;
    text-transform: uppercase;
}

.card-img-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: #eee;
}

.card-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-category {
    font-size: 0.85rem;
    color: #333;
    font-weight: 400;
}

/* Responsive: 2 columns on tablet, 1 column on mobile */
@media (max-width: 992px) {
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .col-offset-1,
    .col-offset-2 {
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-section {
        padding: 4rem 1.5rem;
    }

    .projects-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================================
   IN-FRAME YOUTUBE VIDEO STYLES
   ============================================================ */

.card-img-wrapper.video-player-box {
    position: relative;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    background-color: #000;
    overflow: hidden;
    width: 100%;
}

.card-img-wrapper.video-player-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.card-img-wrapper.video-player-box:hover img {
    transform: scale(1.04);
    opacity: 0.9;
}

/* Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.video-play-btn i {
    color: #1a1a1a;
    font-size: 1.2rem;
    margin-left: 3px;
}

.card-img-wrapper.video-player-box:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background-color: #ffffff;
}

/* Embedded YouTube iframe taking the exact frame */
.card-img-wrapper.video-player-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.footer {
    width: 100%;
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFBF6;
}

.footer-left {
    margin-left: 4%;
}

.title-footer {
    text-align: left;
    font-size: 4rem;
    margin-bottom: 1%;
    line-height: 1.2;
    color: #083168;
    font-family: 'Brown';
}

.title-footer1 {
    text-align: left;
    font-size: 3rem;
    margin-bottom: 1%;
    line-height: 1.2;
    color: #9ab8df;
    font-family: 'Brown';
}

.footer-text {
    text-align: left;
}

.footer-right {
    text-align: center;
    margin-right: 10%;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #3f444c;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.footer-links a:hover {
    color: #083168;
    text-decoration: underline;
}

.icons .fa-brands {
    color: #2c302e;
    margin: 0 13px;
    cursor: pointer;
    padding: 18px 0;
    font-size: 20px;
    opacity: 0.7;
    transition: 0.5s;
    margin-left: 5%;
}

/* ============================================================
   LEGAL PAGES STYLES (Aviso Legal, Privacidad, Cookies)
   ============================================================ */

.legal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background-color: #FFFBF6;
    border-bottom: 1px solid rgba(8, 49, 104, 0.08);
}

.legal-nav-logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.legal-nav-links {
    display: flex;
    gap: 2rem;
}

.legal-nav-links a {
    text-decoration: none;
    color: #083168;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.legal-nav-links a:hover {
    color: #7B4934;
}

.legal-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.legal-header {
    margin-bottom: 3.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(8, 49, 104, 0.15);
}

.legal-subtitle {
    display: block;
    font-size: 1rem;
    color: #7B4934;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.legal-title {
    font-family: 'Brown', 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #083168;
    line-height: 1.15;
    margin-bottom: 0.8rem;
}

.legal-updated {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.legal-section h2 {
    font-family: 'Brown', 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #083168;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.legal-h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-section p {
    color: #333;
    line-height: 1.75;
    font-size: 1.02rem;
    margin-bottom: 1rem;
}

.legal-section p a,
.legal-list a {
    color: #083168;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.legal-section p a:hover,
.legal-list a:hover {
    color: #7B4934;
}

.legal-list {
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legal-list li {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
}

/* Legal Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid rgba(8, 49, 104, 0.12);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background-color: #ffffff;
}

.legal-table th {
    background-color: #083168;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.legal-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0ece6;
    color: #333;
    line-height: 1.5;
}

.legal-table tr:nth-child(even) {
    background-color: #fcfaf7;
}

.legal-action-box {
    margin: 2rem 0;
}

/* ============================================================
   COOKIE CONSENT BANNER & BUTTONS
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 900px;
    background: rgba(255, 251, 246, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(8, 49, 104, 0.15);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    z-index: 99999;
    padding: 22px 28px;
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-title {
    font-family: 'Brown', 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #083168;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-banner-title i {
    color: #7B4934;
}

.cookie-banner-desc {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

.cookie-banner-desc a {
    color: #083168;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    white-space: nowrap;
}

.btn-cookie-accept {
    background-color: #083168;
    color: #ffffff;
}

.btn-cookie-accept:hover {
    background-color: #0c438d;
    box-shadow: 0 4px 12px rgba(8, 49, 104, 0.25);
}

.btn-cookie-reject {
    background-color: transparent;
    color: #083168;
    border: 1px solid rgba(8, 49, 104, 0.3);
}

.btn-cookie-reject:hover {
    background-color: rgba(8, 49, 104, 0.06);
    border-color: #083168;
}

.btn-cookie-manage {
    background-color: #083168;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
}

.btn-cookie-manage:hover {
    background-color: #0c438d;
}

/* Responsive adjustments for Legal & Cookies */
@media (max-width: 850px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .legal-nav {
        padding: 1.2rem 1.5rem;
    }

    .legal-container {
        padding: 2.5rem 1.5rem 4rem;
    }

    .legal-title {
        font-size: 2.4rem;
    }

    .footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        margin: 0;
        text-align: center;
    }

    .title-footer,
    .title-footer1,
    .footer-text {
        text-align: center;
    }
}