/* Custom Styles for ANSACA Website */

/* Hide scrollbar for Lenis smooth scrolling to look better */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0B3C5D; /* Primary color */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00A6A6; /* Secondary color */
}

/* Lenis Recommended CSS */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Custom Animation Utility */
.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .8; }
}

/* Scroll Line Animation */
.scroll-line {
    animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preloader-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #0B3C5D; /* Primary color */
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.panel-left {
    left: 0;
}

.panel-right {
    right: 0;
}

.preloader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B3C5D;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 40px rgba(0, 166, 166, 0.4);
    animation: preloader-pulse 2s infinite ease-in-out;
}

.preloader-line {
    width: 150px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #00A6A6; /* Secondary color */
    transform: translateX(-100%);
}

@keyframes preloader-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 166, 166, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 60px rgba(0, 166, 166, 0.6); }
}

.loading-text {
    margin-top: 1rem;
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.6;
}

/* ── Homepage Newsletter Opt-in Section ── */
.newsletter-optin-box {
    border-radius: 1.5rem;
    padding: 2.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #0B3C5D 0%, #082f49 50%, #00A6A6 100%);
}
@media (min-width: 768px) {
    .newsletter-optin-box {
        padding: 3.5rem 3rem;
        border-radius: 2rem;
    }
}
.newsletter-optin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.25rem;
    align-items: center;
    position: relative;
    z-index: 10;
    width: 100%;
}
@media (min-width: 992px) {
    .newsletter-optin-grid {
        grid-template-columns: 1fr 1.08fr;
        gap: 3.5rem;
    }
}
.newsletter-optin-info {
    width: 100%;
}
.newsletter-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #38bdf8;
    margin-bottom: 0.85rem;
}
.newsletter-optin-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 0.85rem;
}
@media (min-width: 640px) {
    .newsletter-optin-title {
        font-size: 2.25rem;
    }
}
.newsletter-optin-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.newsletter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    font-size: 0.82rem;
    color: #ccfbf1;
    font-weight: 500;
}
.newsletter-chips span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.newsletter-chips i, .newsletter-chips svg {
    color: #5eead4;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* The Form Container */
.newsletter-form-container {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    box-sizing: border-box;
}
@media (min-width: 640px) {
    .newsletter-form-container {
        padding: 2.25rem;
    }
}
.newsletter-input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
@media (min-width: 600px) {
    .newsletter-input-row {
        grid-template-columns: 1fr 1fr;
    }
}
.newsletter-field {
    margin-bottom: 0.85rem;
}
.newsletter-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #ccfbf1;
    margin-bottom: 0.35rem;
}
.newsletter-field-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    border: 2px solid transparent;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: all 0.2s;
    box-sizing: border-box;
}
.newsletter-field-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}
.newsletter-submit-btn {
    width: 100%;
    padding: 0.95rem 1.5rem;
    margin-top: 0.4rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #020617;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.newsletter-submit-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 25px -5px rgba(245, 158, 11, 0.6);
}
.newsletter-submit-btn:active {
    transform: translateY(0);
}
.newsletter-footer-note {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.4;
}
