/* =========================================
   STYLE.CSS - Common Styles for All Pages
   ========================================= */

/* =========================
   WHATSAPP FLOATING BUTTON
========================= */
.whatsapp-float {
    position: fixed;
    bottom: 100px;  /* Position above scroll button */
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 5px 30px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

/* Tooltip - positioned to the left */
.whatsapp-float .whatsapp-tooltip {
    position: absolute;
    right: 72px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.whatsapp-float .whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid rgba(0, 0, 0, 0.8);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(-5px);
}

@keyframes pulse-whatsapp {
    0%, 100% { box-shadow: 0 5px 30px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 5px 45px rgba(37, 211, 102, 0.7); }
}

/* =========================
   SCROLL TO TOP BUTTON
========================= */
.scroll-top {
    position: fixed;
    bottom: 30px;  /* At the bottom */
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--pink, #e85b88);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(232, 91, 136, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--dark-blue, #063b67);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(6, 59, 103, 0.35);
}

/* =========================
   RESPONSIVE - Mobile
========================= */
@media(max-width:600px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 85px;  /* Mobile: above scroll button */
        right: 20px;
    }
    
    .whatsapp-float .whatsapp-tooltip {
        display: none;  /* Hide tooltip on mobile */
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* =========================
   FORM SUCCESS/ERROR MESSAGES
========================= */
#formSuccess, #formError {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
    display: none;
}

#formSuccess {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#formSuccess i {
    color: #28a745;
    margin-right: 10px;
}

#formError {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

#formError i {
    color: #dc3545;
    margin-right: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   LOADING STATE FOR BUTTONS
========================= */
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

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

/* =========================
   CONTAINER - Full Width
========================= */
.container {
    width: 94%;
    max-width: 1400px;
    margin: auto;
    padding: 0 15px;
}

/* For sections with background colors - stretch full width */
.section {
    padding: 70px 0;
    width: 100%;
}

/* Keep hero content centered */
.hero-content {
    max-width: 900px;  /* Increased from 780px */
    margin: auto;
}

/* For text-heavy sections, keep readability */
.about-main p,
.program-card p,
.story-text p {
    max-width: 100%;
}

/* =========================
   RESPONSIVE - Adjust for smaller screens
========================= */
@media(max-width:1200px) {
    .container {
        width: 95%;
        max-width: 1200px;
    }
}

@media(max-width:768px) {
    .container {
        width: 96%;
        padding: 0 10px;
    }
    
    .hero-content {
        max-width: 100%;
    }
}

@media(max-width:480px) {
    .container {
        width: 98%;
        padding: 0 8px;
    }
}

/* =========================
   DROPDOWN MENU
========================= */

/* Dropdown container */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown trigger link */
.dropdown-trigger {
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: .3s;
    cursor: pointer;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-trigger i {
    font-size: 11px;
    transition: .3s;
}

.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-trigger:hover {
    color: var(--blue);
}

/* Dropdown menu - hidden by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    padding: 8px 0;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    z-index: 999;
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Show dropdown on hover */
.nav-dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown items */
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    transition: .3s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f5f0ff;
    color: var(--blue);
    padding-left: 26px;
}

/* Add a small triangle on top of dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    filter: drop-shadow(0 -2px 5px rgba(0, 0, 0, 0.04));
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 950px) {
    /* On mobile, dropdown becomes part of the menu */
    .nav-dropdown {
        width: 100%;
    }
    
    .dropdown-trigger {
        padding: 13px 20px;
        justify-content: space-between;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: #f8f6fc;
        opacity: 1;
        transform: none;
        display: none;
        border: none;
        pointer-events: auto;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-menu a {
        padding: 10px 20px 10px 40px;
        font-size: 13px;
    }
    
    .dropdown-menu a:hover {
        padding-left: 46px;
    }
    
    /* Show dropdown on click for mobile */
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
}
