/* ========================================
   Divine Multi-Purpose Cooperative Society
   Main Stylesheet
   ======================================== */

/* === CSS RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --royal-blue: #1A3C8A;
    --gold: #F3C851;
    --white: #FFFFFF;
    --soft-grey: #F5F5F7;
    --deep-navy: #0C1B33;
    --light-blue: #E8F0FE;
    --text-dark: #2C3E50;
    --text-grey: #6C757D;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --font-accent: 'Montserrat', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* === PRELOADER === */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--royal-blue), var(--deep-navy));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-accent);
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(243, 200, 81, 0.3);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* === UTILITY CLASSES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    max-width: 100%;
    padding: 0 2rem;
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--deep-navy);
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-grey);
    text-align: center;
    margin-bottom: var(--spacing-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.text-gold {
    color: var(--gold);
}

.bg-soft-grey {
    background-color: var(--soft-grey);
}

.bg-royal-blue {
    background-color: var(--royal-blue);
}

.bg-light-blue {
    background-color: var(--light-blue);
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-secondary);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: var(--royal-blue);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--deep-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-gold {
    background: var(--gold);
    color: var(--deep-navy);
    box-shadow: var(--shadow-md);
}

.btn-gold:hover {
    background: #e0b640;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--royal-blue);
    border: 2px solid var(--royal-blue);
}

.btn-outline:hover {
    background: var(--royal-blue);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--royal-blue);
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-accent);
    color: var(--royal-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo span {
    color: var(--gold);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link.active {
    color: var(--royal-blue);
}

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

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

.nav-cta {
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--royal-blue);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* === HERO SECTION === */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--royal-blue) 100%);
    color: var(--white);
    padding: 150px 0 100px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23F3C851' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-text .highlight {
    color: var(--gold);
}

.hero-text p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image-placeholder {
    background: linear-gradient(135deg, rgba(243, 200, 81, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.hero-icon {
    font-size: 8rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* === STATS SECTION === */
.stats {
    background: var(--white);
    padding: 3rem 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-accent);
    color: var(--royal-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-grey);
    font-weight: 500;
}

/* === CARDS === */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--royal-blue), var(--deep-navy));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--deep-navy);
    margin-bottom: 1rem;
}

.card-text {
    font-size: 1rem;
    color: var(--text-grey);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--royal-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    color: var(--gold);
}

/* === GRID LAYOUTS === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* === PRODUCT CARDS === */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card.featured {
    background: linear-gradient(135deg, var(--royal-blue), var(--deep-navy));
    color: var(--white);
}

.product-card.featured .product-title,
.product-card.featured .product-price {
    color: var(--white);
}

.product-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--deep-navy);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--deep-navy);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-accent);
    color: var(--royal-blue);
    margin-bottom: 1.5rem;
}

.product-features {
    list-style: none;
    margin-bottom: 2rem;
}

.product-features li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--soft-grey);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.product-features li:last-child {
    border-bottom: none;
}

.product-features .icon {
    color: var(--gold);
    font-size: 1.2rem;
}

/* === TESTIMONIALS === */
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial-quote {
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.3;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-blue), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.testimonial-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: 0.2rem;
}

.testimonial-info p {
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* === ACCORDION === */
.accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.accordion-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: var(--soft-grey);
}

.accordion-header.active {
    background: var(--light-blue);
}

.accordion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-navy);
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--royal-blue);
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

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

.accordion-content.active {
    max-height: 500px;
}

.accordion-body {
    padding: 1.5rem 2rem;
    color: var(--text-grey);
    line-height: 1.8;
}

/* === FORM STYLES === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--soft-grey);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(26, 60, 138, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* === LOAN CALCULATOR === */
.calculator-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.calculator-input-group {
    margin-bottom: 2rem;
}

.calculator-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 0.8rem;
}

.calculator-value {
    color: var(--royal-blue);
    font-size: 1.1rem;
}

.calculator-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--soft-grey);
    outline: none;
    -webkit-appearance: none;
}

.calculator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--royal-blue);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.calculator-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--royal-blue);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.calculator-result {
    background: var(--light-blue);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
}

.calculator-result-label {
    font-size: 1rem;
    color: var(--text-grey);
    margin-bottom: 0.5rem;
}

.calculator-result-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-accent);
    color: var(--royal-blue);
}

/* === FOOTER === */
.footer {
    background: var(--deep-navy);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.footer-about p {
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(243, 200, 81, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gold);
    color: var(--deep-navy);
    transform: translateY(-3px);
}

.footer-section h4 {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-link {
    opacity: 0.9;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    opacity: 1;
    color: var(--gold);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.8;
}

/* === WHATSAPP FLOAT BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.3s ease;
    cursor: pointer;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 3rem 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
    }
    
    .card,
    .product-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
}