/* ============================================
   Sree Nayaki Chits - Advanced Modern CSS
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #6b7280;
    --accent-color: #10b981;
    --accent-dark: #059669;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-background: #0f172a;
    --dark-surface: #1e293b;
    --light-background: #f8fafc;
    --white-color: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-speed: 0.3s;
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light-background);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--dark-background) 0%, var(--dark-surface) 100%);
    color: var(--white-color);
    padding: 24px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(15, 23, 42, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform var(--transition-speed) ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo {
    height: 60px;
    width: auto;
}

.header-text {
    flex: 1;
    min-width: 200px;
}

header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 4px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white-color) 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    opacity: 0.9;
    color: #cbd5e1;
}

/* Image Carousel Styles */
.carousel-section {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 800px;
    overflow: hidden;
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
}

.carousel-section::before {
    display: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.1);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white-color);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    user-select: none;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Carousel Dots Indicator */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.dot.active {
    background: var(--white-color);
    width: 32px;
    border-radius: 6px;
    border-color: var(--white-color);
}

/* Navigation Styles */
nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 88px;
    z-index: 999;
}

nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: var(--white-color);
    text-decoration: none;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left var(--transition-speed) ease;
}

nav a:hover::before {
    left: 0;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: transform var(--transition-speed) ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Menu Open State */
@media (max-width: 768px) {
    nav .container:not(.mobile-open) a {
        display: none;
    }
    
    nav .container.mobile-open {
        flex-direction: column;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    nav .container.mobile-open a {
        display: block;
        width: 100%;
        text-align: center;
        margin: 4px 0;
    }
}

/* Hero Section */
#home {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(59, 130, 246, 0.85) 100%),
                linear-gradient(45deg, rgba(16, 185, 129, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    background-size: cover, 200% 200%;
    background-position: center, 0% 50%;
    animation: gradientShift 15s ease infinite;
    color: var(--white-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 120px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: center, 0% 50%; }
    50% { background-position: center, 100% 50%; }
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#home .container {
    position: relative;
    z-index: 1;
}

#home h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 24px;
    color: var(--white-color);
    font-weight: 700;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

#home h2::after {
    background-color: var(--white-color);
    width: 80px;
    height: 4px;
    margin: 20px auto;
}

#home p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: var(--white-color);
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-speed) var(--transition-bounce);
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.3);
}

.cta-button:active {
    transform: translateY(-2px) scale(0.98);
}

.cta-button-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Styles */
section {
    padding: 100px 0;
    margin-bottom: 24px;
    background-color: var(--white-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-speed) ease;
}

section:hover::before {
    transform: scaleX(1);
}

section:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}

section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

section p {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
#about {
    background: linear-gradient(180deg, var(--white-color) 0%, var(--light-background) 100%);
    margin-top: 0;
    padding-top: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white-color);
    padding: 32px 24px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: transform var(--transition-speed) ease;
}

.stat-card:hover::before {
    transform: scale(1.2);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Services Section */
#services ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

#services li {
    background: linear-gradient(135deg, var(--white-color) 0%, var(--light-background) 100%);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: left;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

#services li::before {
    content: '✓';
    position: absolute;
    top: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease;
}

#services li:hover::before {
    transform: rotate(360deg) scale(1.1);
}

#services li:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

#services li strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-left: 60px;
    font-weight: 700;
}

#services li p {
    font-size: 1rem;
    padding-left: 60px;
    color: var(--text-secondary);
    margin: 0;
}

/* Contact Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.contact-item {
    background: linear-gradient(135deg, var(--light-background) 0%, var(--white-color) 100%);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: 2px solid var(--border-color);
    position: relative;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transform: scaleY(0);
    transition: transform var(--transition-speed) ease;
}

.contact-item:hover::before {
    transform: scaleY(1);
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.contact-item strong {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 16px;
    display: block;
    font-weight: 700;
}

.contact-item p {
    margin: 8px 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
}

.contact-item a:hover {
    color: var(--accent-color);
    background-color: rgba(16, 185, 129, 0.1);
    transform: translateX(4px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-background) 0%, var(--dark-surface) 100%);
    color: var(--white-color);
    text-align: center;
    padding: 48px 0;
    margin-top: 48px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
    text-align: left;
}

.footer-section h3 {
    color: var(--white-color);
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color var(--transition-speed) ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .carousel-section {
        height: 65vh;
        min-height: 450px;
        max-height: 700px;
    }
    
    section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .carousel-section {
        height: 60vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .dot.active {
        width: 24px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    nav {
        top: auto;
        position: relative;
    }
    
    nav .container {
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: block;
        order: -1;
        margin-right: auto;
    }
    
    #home {
        min-height: 500px;
        padding: 80px 0;
    }
    
    section {
        padding: 60px 0;
        margin-bottom: 16px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    #services ul {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .carousel-section {
        height: 50vh;
        min-height: 300px;
        max-height: 400px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-dots {
        bottom: 10px;
        gap: 6px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 20px;
    }
    
    .logo {
        height: 50px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    #home {
        min-height: 400px;
        padding: 60px 0;
    }
    
    section {
        padding: 40px 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .carousel-section {
        height: 100vh;
        min-height: 400px;
        max-height: 100vh;
    }
}

/* Portrait Orientation for Mobile */
@media (orientation: portrait) and (max-width: 768px) {
    .carousel-section {
        height: 55vh;
        min-height: 300px;
    }
}

/* Print Styles */
@media print {
    nav,
    .scroll-to-top,
    .cta-button,
    .carousel-section {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

