/* ==========================================================================
   styles.css - Main Stylesheet for Met Data Solutions
   ========================================================================== */

/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Kumbh Sans', sans-serif;
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
/* Shared heading styles with modern CSS */
.main__content h1,
.main__content h2 {
    color: transparent;
    background: #141414;
    background-clip: text;
    -webkit-background-clip: text; /* Still needed for most browsers */
    -webkit-text-fill-color: transparent; /* WebKit-specific property */
}

.main__content h1 {
    font-size: 3rem;
}

.main__content h2 {
    font-size: 2rem;
    margin-top: 1rem;
}

.custom-bullets {
    margin-top: 1rem;
    margin-left: 2px;
    font-size: 2rem;
    font-weight: 700;
    color: #434343;
}

.custom-bullets li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem; /* Small padding for better text alignment */
}

.FAQ__container h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.accordion-title {
    font-size: 1.1rem;
    color: #374151;
    font-weight: 500;
}

.accordion-content p {
    padding: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ==========================================================================
   3. Layout & Grid
   ========================================================================== */
.navbar__container,
.main__container,
.map-container,
.footer__links,
.messages-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
}

.main__container {
    max-width: 1700px; /* Exception to standard width */
    margin: 0 auto 6.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: center;
    padding: 2rem 50px;
    gap: 50px;
    min-height: 600px;
    position: relative;
    overflow: visible;
}

.main__content {
    width: 100%;
}

.main__img--container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding-bottom: -20px;
}

.map-container {
    position: relative;
    height: 600px;
    margin: 50px auto;
}

.FAQ__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.footer__link--wrapper {
    text-align: center;
}

.footer__link--items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   4. Buttons & Interactive Elements
   ========================================================================== */
   .button {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 1.1rem;
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    border-radius: 4px;
    background: #444444;
    color: #fff;
}

.button:hover {
    background: #4338CA;
}

.button--logout {
    background: transparent;
    border: 1px solid #4F46E5;
    color: #4F46E5;
    margin-left: 10px; /* Add spacing before the logout button */
}

.button--logout:hover {
    background: #4F46E5;
    color: #fff;
}

.main__btn {
    font-size: 1.5rem; /* Larger font size */
    background-image: linear-gradient(to right, #f77062, #fe5196); /* Matching gradient */
    padding: 0.875rem 2rem; /* Adjusted padding */
    border: none;
    border-radius: 4px; /* Added border radius */
    color: white;
    margin-top: 2rem;
    margin-left: 2rem; /* Added left margin to align with list */
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    outline: none;
}

.main__btn a {
    position: relative;
    z-index: 2;
    color: white;
    text-decoration: none;
}

.main__btn::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #4837ff; /* Darker orange for hover effect */
    transition: width 0.3s ease;
    border-radius: 4px;
}

.main__btn:hover::after {
    width: 100%;
}

.search-box {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
}

.accordion-item button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

/* ==========================================================================
   5. Navigation
   ========================================================================== */
.navbar {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar__container {
    display: flex;
    justify-content: space-between;
    height: 80px;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
}

#navbar__logo {
    color: #141414; /* Set text color to black */
    font-weight: 700; /* Bold font weight */
    font-size: 2rem; /* Keep font size */
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

#logo__img {
    height: 30px; /* Adjust the height as needed */
    width: auto; /* Maintain the aspect ratio */
    vertical-align: middle; /* Align the image with the text */
    margin-right: 8px;
}

.navbar__menu {
    display: flex;
    align-items: center;
    list-style: none;
}

.navbar__item {
    height: 80px;
    
}

.navbar__links {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
    padding: 0 1rem;
    transition: color 0.3s ease;
}

.navbar__links:hover {
    color: #4F46E5;
}

.navbar__toggle {
    display: none;
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.main {
    background-color: #fff; /* Changed from light gray to pure white */
    padding: 5px 0 100px; 
}

#main__img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    position: relative;
    z-index: 2;
    border-radius: 0; /* Removed border radius */
    box-shadow: none; /* Removed shadow */
}

/* ==========================================================================
   7. Map Section
   ========================================================================== */
#map {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.search-panel {
    position: absolute;
    top: 20px;
    left: 50px;
    z-index: 1000;
    width: 300px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   8. FAQ Section
   ========================================================================== */
.accordion {
    width: 100%;
}

.accordion-item {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.accordion-content {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height 0.3s ease-out, opacity 0.3s ease-out;
}

.accordion-content.active {
    height: auto;
    opacity: 1;
    padding-bottom: 1rem;
}

/* Icon styles */
.icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.icon::before,
.icon::after {
    content: '';
    position: absolute;
    background-color: #6b7280;
    transition: transform 0.3s ease;
}

.icon::before {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    margin-left: -1px;
}

.icon::after {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
}

[aria-expanded="true"] .icon::before {
    transform: rotate(90deg);
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
   footer.bg-dark {
    background: #1e293b !important; /* Override Bootstrap's bg-dark if needed */
    padding: 20px 0;
}

.footer-link {
    color: white !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #a0aec0 !important; /* A slightly lighter grey for better contrast */
    text-decoration: underline;
}

/* Add some spacing for the grouped text content */
footer .mb-3 p {
    margin-bottom: 0.25rem;
}

/* Style for the horizontal rule */
footer hr {
    opacity: 0.2;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Style for the copyright text */
footer .text-muted {
    color: #a0aec0 !important; /* Ensuring it's readable but subdued */
}

/* ==========================================================================
   10. Utilities - Messages & Alerts
   ========================================================================== */
.messages-container {
    margin: 20px auto;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fecaca;
    color: #991b1b;
}

/* ==========================================================================
   11. Animations
   ========================================================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-slide {
    animation: slideIn 0.3s ease-out;
}

/* ==========================================================================
   12. Media Queries - Responsive Design
   ========================================================================== */
@media screen and (max-width: 960px) {
    /* Navigation responsive */
    .navbar__container {
        padding: 0 30px;
    }


    #navbar__logo {
        font-size: 1.5rem; /* Smaller font size on mobile */
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
    }

    .navbar__menu {
        display: none;
        flex-direction: column;
        width: auto; /* Change from 100% to auto */
        position: absolute;
        top: 80px;
        right: 0; /* Align to right instead of left */
        left: auto; /* Remove left positioning */
        background: #f2f2f2;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 0 4px; /* Rounded corner on bottom left */
        min-width: 120px; /* Minimum width for the dropdown */
        max-width: 150px;
    }

    .navbar__menu.active {
        display: flex;
    }

    .navbar__item {
        height: 60px; /* Slightly more compact */
        width: 100%;
        border-bottom: 1px solid #f1f1f1; /* Optional separator */
    }

    .navbar__item:last-child {
        border-bottom: none; /* Remove border from last item */
    }

    .navbar__links {
        padding: 0 15px;
        width: 100%;
        justify-content: center; /* Center text */
        padding: 0 20px; /* Horizontal padding */
    }

    .navbar__btn {
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* This targets buttons inside the navbar when in mobile mode */
    .navbar__menu a,
    .navbar__menu button,
    .navbar__links,
    .button--logout,
    .button,
    [class*="btn-"] {
        width: 100%;
        background: transparent !important;
        color: #333 !important;
        border: none !important;
        box-shadow: none !important;
        text-align: center !important;
        padding: 0 15px !important;
        margin: 0 !important;
        height: auto !important;
        line-height: inherit !important;
        font-size: inherit !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Ensure all navbar items have consistent height and positioning */
    .navbar__item,
    .navbar__btn {
        height: 60px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .button {
        width: 80%;
        text-align: center;
    }

    /* Toggle button for mobile menu */
    .navbar__toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .bar {
        width: 30px;
        height: 3px;
        background-color: #333;
        transition: all 0.3s linear;
    }

    .navbar__toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar__toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .navbar__toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Main content responsive */
    .main__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .main__content {
        margin-bottom: 2rem;
    }

    .custom-bullets {
        display: inline-block;
        text-align: left;
    }

    /* Map responsive */
    .map-container {
        height: 400px;
        padding: 0 30px;
    }

    .search-panel {
        left: 30px;
        right: 30px;
        width: auto;
    }

    /* Other sections responsive */
    .FAQ__container,
    .footer__links {
        padding: 0 30px;
    }
}

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/*13. Marketing Popup
   ========================================================================== */

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000; /* Above navbar (999) but below messages if needed */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popup-fade-in 0.3s ease-out;
}

/* Popup Modal */
.popup-modal {
    background: white;
    border-radius: 4px; /* Match your standard border radius */
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05), 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: popup-slide-up 0.3s ease-out;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.3s ease; /* Match your standard transition */
    z-index: 1;
}

.popup-close:hover {
    background-color: #f2f2f2;
    color: #333;
}

/* Popup Content */
.popup-content {
    padding: 48px 40px 40px;
    text-align: center;
}

/* Title - Matches your heading styles */
.popup-title {
    font-size: 2rem; /* Match your h2 size */
    font-weight: 700;
    color: #141414; /* Match your main text color */
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Description */
.popup-description {
    font-size: 1.1rem;
    color: #374151; /* Match your accordion title color */
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

/* Form */
.popup-form {
    margin-bottom: 1rem;
}

.popup-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

/* Email Input - Matches your search box styling */
.popup-input-group input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    box-sizing: border-box;
}

.popup-input-group input[type="email"]:focus {
    outline: none;
    border-color: #4F46E5; /* Match your brand color */
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.popup-input-group input[type="email"]::placeholder {
    color: #a0aec0;
}

/* Submit Button - Based on your main__btn styling */
.popup-submit-btn {
    width: 100%;
    font-size: 1.1rem;
    background-image: linear-gradient(to right, #f77062, #fe5196);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.popup-submit-btn::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #4837ff;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.popup-submit-btn:hover:not(:disabled)::after {
    width: 100%;
}

.popup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.popup-submit-btn:disabled::after {
    display: none;
}

.popup-btn-text,
.popup-btn-loading {
    position: relative;
    z-index: 2;
}

/* Loading Spinner */
.popup-spinner {
    width: 20px;
    height: 20px;
    animation: popup-spin 1s linear infinite;
}

.popup-spinner circle {
    stroke-dasharray: 31.416;
    stroke-dashoffset: 31.416;
    animation: popup-spin-circle 2s ease-in-out infinite;
}

/* Error Message - Matches your alert-error styling */
.popup-error {
    background-color: #fecaca;
    color: #991b1b;
    font-size: 14px;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Footer Text */
.popup-footer {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design - Match your 960px breakpoint */
@media screen and (max-width: 960px) {
    .popup-modal {
        margin: 30px;
        width: auto;
    }
    
    .popup-content {
        padding: 32px 24px 24px;
    }
    
    .popup-title {
        font-size: 1.75rem;
    }
    
    .popup-description {
        font-size: 1rem;
    }
    
    .popup-input-group {
        gap: 0.75rem;
    }
    
    .popup-input-group input[type="email"],
    .popup-submit-btn {
        padding: 12px 16px;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes popup-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popup-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popup-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes popup-spin-circle {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124;
    }
}

/* Hide popup by default */
.popup-overlay.hidden {
    display: none !important;
}
