/* Base Styles and Tokens */
:root {
    --primary-color: hsl(212, 100%, 25%); /* Institutional Blue */
    --primary-hover: hsl(212, 100%, 15%);
    --secondary-color: hsl(210, 20%, 96%);
    --secondary-hover: hsl(210, 20%, 90%);
    --text-primary: hsl(210, 29%, 20%);
    --text-secondary: hsl(210, 20%, 40%);
    --bg-color: hsl(0, 0%, 100%);
    --border-color: hsl(210, 20%, 90%);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-color);
    /* Elegant and subtle texture pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23004799' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    max-height: 60px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 64px 0;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    text-align: left;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: none; /* Hidden on small screens */
    text-align: right;
}

.hero-image img {
    width: 100%;
    max-width: 450px; /* Keep map sized nicely */
    object-fit: contain;
}

.map-image {
    transition: var(--transition);
}

.map-image:hover {
    transform: scale(1.02);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero .highlight {
    color: var(--primary-color);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 40px 0;
    font-weight: 300;
}

/* Buttons */
.buttons-container {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:active {
    transform: translateY(2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 hsla(212, 100%, 25%, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0, 71, 153, 0.23);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

/* Partners Section (Logos) */
.partners-section {
    display: none; /* Hidden on small screens */
    padding: 30px 0 0 0;
    background-color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10; /* Ensures the hover tooltip goes over the footer */
}

.partners-title {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 35px 0 120px 0; /* Huge internal padding to prevent any clipping of the tooltip */
    margin-bottom: -80px; /* Pulls the footer up so there's no visual dead space */
}

.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--secondary-color) 0%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--secondary-color) 0%, transparent 100%);
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 60px;
    padding-right: 60px; /* match the gap for seamless loop */
    animation: marquee-scroll 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused; /* Pause on hover for better UX */
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center center;
}

.logo-item img {
    height: 130px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.4s ease;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: transparent;
}

.logo-item:hover {
    transform: scale(1.6);
    z-index: 10;
}

.logo-item:hover img {
    filter: grayscale(0%) opacity(1);
    border-color: rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.logo-name {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    background-color: #ffffff;
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
    letter-spacing: 0.3px;
}

.logo-item:hover .logo-name {
    opacity: 1;
    visibility: visible;
    margin-top: 12px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background-color: var(--text-primary);
    color: white;
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.footer-logo {
    max-height: 80px;
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.footer-subtitle {
    font-size: 0.9rem;
    color: hsl(210, 20%, 70%);
}

.footer-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.footer-credits {
    text-align: center;
    font-size: 0.875rem;
    color: hsl(210, 20%, 60%);
}

.footer-credits .copyright {
    margin-top: 8px;
    font-size: 0.8rem;
    color: hsl(210, 20%, 40%);
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-color);
    margin: auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-download-direct {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-download-direct:hover {
    background-color: var(--primary-hover);
}

.close {
    width: 36px;
    height: 36px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close:hover,
.close:focus {
    background-color: rgba(200, 0, 0, 0.1);
    color: #d32f2f;
    text-decoration: none;
}

iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Responsive */
@media (min-width: 992px) {
    .hero-image {
        display: block;
    }
    
    .partners-section {
        display: block;
    }
}
@media (max-width: 768px) {
    .header-container {
        justify-content: center;
    }

    .brand {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
        margin: 0 auto 40px auto;
    }

    .buttons-container {
        flex-direction: column;
        justify-content: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-info {
        flex-direction: column;
        text-align: center;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    iframe {
        border-radius: 0;
    }
}
