/* ==========================================================================
   Design System & Custom Properties
   ========================================================================== */
:root {
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --primary-color: #1e40af; /* Deep Trust Blue */
    --primary-hover: #1d4ed8;
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
    --card-hover-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08);
    --border-radius: 16px;
    --transition-speed: 0.3s;
    
    /* Layout heights for desktop */
    --header-height: 80px;
    --footer-height: 250px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background: var(--bg-gradient);
    overflow: hidden; /* Prevent scroll on desktop */
}

/* Base link reset */
a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    justify-content: space-between;
}

/* ==========================================================================
   Header Section (Left Nav, Right Socials)
   ========================================================================== */
.site-header {
    height: var(--header-height);
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Header Social Media Icons */
.header-socials {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
    color: #ffffff;
}

.social-icon-link svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-speed) ease;
}

#social-link-facebook {
    background-color: #1877f2;
    border: 1px solid rgba(24, 119, 242, 0.2);
}

#social-link-youtube {
    background-color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

#social-link-whatsapp {
    background-color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.social-icon-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Body Section (Large Centered Logo)
   ========================================================================== */
.site-body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 4rem;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-logo-large {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.04));
    transition: transform 0.5s ease;
}

.hero-logo-large:hover {
    transform: scale(1.01);
}

/* ==========================================================================
   Footer Section (3 Columns matching sketch)
   ========================================================================== */
.site-footer {
    height: var(--footer-height);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--card-border);
    padding: 1rem 4rem;
    display: flex;
    align-items: center;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.footer-column {
    display: flex;
}

.office-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    width: 100%;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.office-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(30, 64, 175, 0.15);
}

.office-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid rgba(30, 64, 175, 0.1);
    padding-bottom: 0.25rem;
}

.office-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Footer Left Column: Email List */
.email-list-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    height: 100%;
}

/* Footer Right Column: Contact triggers */
.contact-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    height: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
}

.contact-item:hover {
    color: var(--primary-color);
    background: #ffffff;
    border-color: rgba(30, 64, 175, 0.15);
}

.contact-item .icon {
    font-size: 1rem;
}

/* Contact Form Button trigger */
.contact-form-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    background: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
    transition: all var(--transition-speed) ease;
    width: fit-content;
}

.contact-form-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.15);
}

.contact-form-btn:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Center Column Accordion Styles
   ========================================================================== */
.locations-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-trigger {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.35rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-speed);
}

.accordion-trigger:hover {
    color: var(--primary-color);
}

.accordion-trigger::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 400;
    transition: transform var(--transition-speed);
}

.accordion-item.active .accordion-trigger {
    color: var(--primary-color);
}

.accordion-item.active .accordion-trigger::after {
    content: '−';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) cubic-bezier(0, 1, 0, 1);
}

.accordion-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    line-height: 1.4;
}

.accordion-item.active .accordion-content {
    max-height: 80px; /* Expands smoothly */
    transition: max-height var(--transition-speed) ease-in-out;
}

/* ==========================================================================
   Contact Modal & Form Styles
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Form inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
    background: #ffffff;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-group.error input:focus,
.form-group.error textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.error-message {
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    display: none;
    margin-top: 0.25rem;
}

.form-group.error .error-message {
    display: block;
}

.submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background var(--transition-speed), transform var(--transition-speed);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.form-feedback {
    margin-top: 1.25rem;
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.form-feedback.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.form-feedback.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   Responsive Media Queries (Mobile Stack)
   ========================================================================== */
@media screen and (max-width: 767px) {
    html, body {
        height: auto;
        overflow: auto;
    }

    .app-container {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .site-header {
        height: auto;
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .nav-menu {
        gap: 1.5rem;
        justify-content: center;
        width: 100%;
    }

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

    .site-body {
        height: auto;
        flex: none;
        padding: 2.5rem 1.5rem;
    }

    .hero-image-wrapper {
        height: auto;
    }

    .hero-logo-large {
        max-width: 85%;
        max-height: none;
        height: auto;
    }

    .site-footer {
        height: auto;
        padding: 2.5rem 1.5rem;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .office-card {
        padding: 1.5rem;
    }

    .email-list-details,
    .contact-action-list {
        align-items: center;
    }

    .contact-item,
    .contact-form-btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal Mobile */
    .modal-overlay {
        align-items: flex-start;
        padding: 1rem;
        overflow-y: auto;
    }

    .modal-card {
        padding: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
        max-height: none;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 1.25rem;
    }
}

/* Large screen adjustments for neat padding */
@media screen and (min-width: 1440px) {
    .site-body {
        padding: 2.5rem 8rem;
    }
    .site-header, .site-footer {
        padding-left: 8rem;
        padding-right: 8rem;
    }
}