/* Custom Figma-Matched Footer Styles (node-id: 1-604) */

.custom-footer {
    background-color: #003447; /* Solid rgb(0, 52, 71) */
    color: #ffffff;
    padding: 80px 0 40px;
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.custom-footer-container {
    max-width: 1320px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Top Columns Wrapper */
.custom-footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .custom-footer-top {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* Brand Column */
.custom-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-footer-logo {
    font-size: 66px; /* Reduced to make it slightly smaller and more elegant */
    font-weight: 700;
    letter-spacing: -4.5px; /* Symmetrical letter-spacing adjustments */
    line-height: 1.0;
    margin: 0;
    display: inline-flex;
    align-items: center; /* Enforce absolute horizontal centering */
    white-space: nowrap;
}

.logo-prefix {
    color: #00D6D7;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.logo-prefix-svg,
.logo-prefix svg {
    height: 0.82em;
    width: auto;
    display: block;
    fill: #00D6D7;
    color: #00D6D7;
}

.logo-sliding-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
}

.logo-sliding-text {
    position: absolute;
    left: 0;
    bottom: -100%; /* Start off-screen below */
    width: auto;
    height: 100%;
    white-space: nowrap;
    color: #ffffff !important; /* Full white */
    -webkit-text-fill-color: #ffffff !important; /* Override gradient clips */
    background: none !important;
    opacity: 0;
    letter-spacing: -2px; /* Slightly opened letter-spacing */
    display: flex;
    align-items: center; /* Center text vertically inside dynamic wrapper height */
    transition: bottom 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.logo-sliding-text.active {
    bottom: 0;
    opacity: 1;
}

.logo-sliding-text.exit {
    bottom: 100%; /* Move off-screen above */
    opacity: 0;
}

@media (max-width: 1200px) {
    .custom-footer-logo {
        font-size: 52px;
        letter-spacing: -3.5px;
    }
}

/* Contacts & Socials Column */
.custom-footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.custom-footer-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-footer-label {
    font-size: 18px; /* size: 19px in Figma */
    font-weight: 500;
    color: #59bcb1; /* rgb(89, 188, 177) */
    margin: 0;
}

.custom-footer-link {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.custom-footer-link-email {
    font-size: 16px; /* size: 14px in Figma */
}

.custom-footer-link:hover {
    color: #81e4e5;
    transform: translateX(3px);
}

/* Social Media Container */
.custom-footer-socials {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-footer-social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.custom-footer-social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
}

.custom-footer-social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.custom-footer-social-icon:hover {
    background-color: #15b4b6;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 5px 15px rgba(21, 180, 182, 0.4);
}

/* Newsletter Column */
.custom-footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
}

.custom-footer-newsletter-title {
    font-family: 'Poppins', sans-serif;
    font-size: 26px; /* size: 28px in Figma */
    font-weight: 600;
    color: #59bcb1; /* rgb(89, 188, 177) */
    margin: 0;
    line-height: 1.2;
}

.custom-footer-newsletter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: transparent;
    border: 2px solid #59bcb1;
    color: #ffffff;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: fit-content;
}

.custom-footer-newsletter-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.custom-footer-newsletter-btn:hover {
    background-color: #59bcb1;
    color: #003447;
    box-shadow: 0 8px 20px rgba(89, 188, 177, 0.25);
}

.custom-footer-newsletter-btn:hover svg {
    transform: translateX(4px);
}

/* Bottom Bar */
.custom-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .custom-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.custom-footer-copyright {
    font-size: 15px; /* size: 16px in Figma */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Center Small Logo */
.custom-footer-small-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-footer-small-logo svg {
    width: 45px;
    height: 45px;
    fill: #81e4e5;
    transition: transform 0.5s ease;
}

.custom-footer-small-logo:hover svg {
    transform: rotate(360deg);
}

.custom-footer-policy {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-footer-policy:hover {
    color: #81e4e5;
    text-decoration: underline;
}

/* ==========================================================================
   Newsletter Popup Modal Styling
   ========================================================================== */

.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 52, 71, 0.82); /* Deep dark navy */
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s;
    visibility: hidden;
    padding: 20px;
    box-sizing: border-box;

    /* Hardware acceleration to prevent flickers */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: opacity, visibility;
}

/* Separate pseudo-element for backdrop-filter to prevent safari/chrome transition flicker */
.newsletter-popup-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -1;
    will-change: opacity;
    
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.newsletter-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.newsletter-popup-overlay.active::before {
    opacity: 1;
}

.newsletter-popup-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    background-color: rgb(185, 234, 231); /* Matches Brevo's form background */
    
    /* Hardware acceleration to prevent container jitter/blur on scale */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.newsletter-popup-overlay.active .newsletter-popup-container {
    transform: scale(1) translateY(0);
}

.newsletter-popup-iframe-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    background-color: rgb(185, 234, 231);
    overflow: hidden;
}

.newsletter-popup-iframe {
    width: 100%;
    height: 720px; /* Increased from 650px to completely fit form and bottom branding */
    max-height: 90vh; /* Safe responsive boundaries on short viewports */
    border: none;
    display: block;
    border-radius: 20px;
}

.newsletter-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(12, 75, 77, 0.1);
    border: none;
    color: #0c4b4d;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.newsletter-popup-close svg {
    width: 18px;
    height: 18px;
}

.newsletter-popup-close:hover {
    background: rgba(12, 75, 77, 0.2);
    color: #000000;
    transform: rotate(90deg);
}

@media (max-width: 600px) {
    .newsletter-popup-iframe {
        height: 820px; /* Increased from 760px to fit wrapped content on mobile */
    }
}
