/* ==================== */
/* VARIABLES & BASE CSS */
/* ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0055A4;
    --primary-dark: #003366;
    --secondary: #FFD700;
    --light: #F8F9FA;
    --dark: #2C2F33;
    --gray: #DDE1E4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* =============== */
/* LAYOUT STRUCTURE */
/* =============== */
.legal-wrapper {
    max-width: 100%;
    overflow: hidden;
    padding-top: 70px; /* Navbar height offset */
}

/* ============= */
/* COMPONENTS */
/* ============= */

/* ----- Navigation ----- */
.navbar {
    background-color: var(--primary);
    color: var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* Nav Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-links a:hover {
    color: var(--light);
    transform: translateY(-2px);
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.3);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--light);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.nav-links a.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 0 0 5px 5px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--gray);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Burger Menu */
.menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--gray);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ----- Hero Section ----- */
.legal-hero {
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 20px;
}

.hero-content h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 15s infinite linear;
}

.triangle {
    width: 100px;
    height: 100px;
    background: var(--secondary);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    top: 60%;
    left: 80%;
    animation-delay: 3s;
}

.square {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    top: 30%;
    left: 70%;
    animation-delay: 6s;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ----- Legal Sections ----- */
.legal-container {
    max-width: 1200px;
    margin: -50px auto 50px;
    padding: 0 20px;
}

.legal-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary);
}

.legal-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section h2 i {
    color: var(--secondary);
}

.section-content {
    padding-left: 15px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-label {
    font-weight: 600;
    min-width: 200px;
    color: var(--primary-dark);
}

.info-value {
    flex: 1;
}

.credits-list,
.rights-list {
    list-style-type: none;
    padding-left: 0;
}

.credits-list li,
.rights-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.credits-list li::before {
    content: '•';
    color: var(--secondary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

.rights-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary);
    position: absolute;
    left: 0;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-section a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ----- Footer ----- */
.footer {
    background-color: var(--gray);
    color: #000;
    padding: 4rem 2rem 0;
    width: 100%;
    overflow: hidden;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
    padding-bottom: 3rem;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    transition: transform 0.5s ease;
}

.footer-logo-img {
    width: 220px;
    height: auto;
    filter: brightness(0) saturate(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.08) rotate(-2deg);
    filter: brightness(0) saturate(100%) drop-shadow(0 4px 8px rgba(0, 85, 164, 0.3));
}

.footer-nav {
    flex: 1;
    max-width: 220px;
    padding: 0 1rem;
}

.footer-nav h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.nav-bar {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin-bottom: 1.5rem;
    transform-origin: left;
    transition: transform 0.4s ease, width 0.4s ease;
}

.footer-nav:hover .nav-bar {
    width: 80px;
    background-color: var(--primary-dark);
}

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav li {
    margin-bottom: 0.8rem;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.footer-nav li:hover {
    transform: translateX(8px);
}

.footer-link {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-qrcode {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    position: relative;
}

.qrcode-container {
    position: relative;
    display: inline-block;
    text-align: center;
    margin-bottom: 50px;
}

.qrcode-img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    transition: all 0.5s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px;
}

.qrcode-img:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--primary);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.qrcode-text {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 20px;
    border-radius: 6px;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.qrcode-text::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary);
}

.qrcode-img:hover+.qrcode-text,
.qrcode-container:hover .qrcode-text {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.footer-separator {
    height: 1.5px;
    background-color: #000;
    width: 90%;
    margin: 0 auto;
    opacity: 0.2;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.8rem;
}

/* ============== */
/* MEDIA QUERIES */
/* ============== */

/* ----- Desktop Large ----- */
@media (min-width: 768px) {
    .legal-hero {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .legal-container {
        margin-top: -80px;
    }

    .legal-section::before {
        width: 100%;
        height: 5px;
    }
}

/* ----- Tablet & Small Desktop ----- */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }
    
    .footer-content {
        gap: 3rem;
    }

    .footer-logo-img {
        width: 200px;
    }

    .qrcode-img {
        width: 200px;
        height: 200px;
    }

    .qrcode-text {
        font-size: 1rem;
        bottom: -40px;
        padding: 8px 16px;
    }
}

/* ----- Tablet Portrait ----- */
@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        z-index: 100;
    }

    .nav-links.active {
        max-height: 500px;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: 1rem;
        display: flex;
        justify-content: center;
    }

    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }

    .info-label {
        min-width: 100%;
    }

    .footer {
        padding: 3rem 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-nav {
        max-width: 100%;
        padding: 0;
    }

    .nav-bar {
        margin: 0 auto 1.5rem auto;
    }

    .footer-logo,
    .footer-qrcode {
        min-width: 100%;
    }

    .footer-logo-img {
        width: 180px;
    }

    .qrcode-img {
        width: 180px;
        height: 180px;
    }

    .qrcode-text {
        bottom: -35px;
        font-size: 0.95rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.2rem 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* ----- Mobile ----- */
@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .legal-section {
        padding: 20px;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

    .footer {
        padding: 2.5rem 1rem 0;
    }

    .footer-logo-img {
        width: 160px;
    }

    .qrcode-img {
        width: 150px;
        height: 150px;
    }

    .footer-nav h3 {
        font-size: 1.2rem;
    }

    .footer-link {
        font-size: 0.95rem;
    }

    .qrcode-text {
        bottom: -30px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .qrcode-text::before {
        top: -6px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid var(--primary);
    }
}