/* CSS Variables */
:root {
    --bg-white: #FFFFFF;
    --bg-offwhite: #FAF9F6;
    --primary-emerald: #064E3B;
    --accent-gold: #D97706;
    --accent-gold-hover: #B45309;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    
    --font-islamic: 'Amiri', serif;
    --font-text: 'Poppins', sans-serif;
    
    --transition: all 0.3s ease-in-out;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    background-color: var(--bg-offwhite);
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-islamic);
}

/* Typography Enhancements */
.section-title {
    font-size: 2.5rem;
    color: var(--primary-emerald);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--primary-emerald);
    border-bottom: 3px solid var(--accent-gold);
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-placeholder {
    display: none;
}

.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    transition: transform 0.4s ease-in-out;
    animation: pulseLogo 3s infinite alternate;
}

.nav-logo:hover {
    transform: rotate(360deg) scale(1.1);
    animation-play-state: paused;
}

@keyframes pulseLogo {
    0% { box-shadow: 0 0 5px var(--accent-gold); }
    100% { box-shadow: 0 0 15px var(--accent-gold); }
}

.nav-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('assets/Main backround.jpeg') no-repeat center center/cover;
    overflow: hidden;
}

/* Soft Gradient Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 78, 59, 0.4), rgba(6, 78, 59, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
}

.hero-title {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(217, 119, 6, 0.8), 0 0 30px rgba(217, 119, 6, 0.4);
    /* Entrance Animation Default State */
    opacity: 0;
    transform: scale(0.9);
    animation: fadeScaleIn 1.5s ease-out forwards;
}

#typing-text {
    text-shadow: 0 0 20px rgba(217, 119, 6, 1), 0 0 40px rgba(217, 119, 6, 0.6);
}

.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--bg-white);
    text-shadow: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Particles / Falling Stars */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    top: -50px;
    color: rgba(255, 215, 0, 0.7); /* Gold color */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: fall linear forwards;
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--bg-white);
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-subtitle i {
    color: var(--accent-gold);
    margin-right: 8px;
}

@keyframes fadeScaleIn {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- About & Features Section --- */
.about-section {
    padding: 5rem 2rem;
    background-color: var(--bg-offwhite);
}

.about-content {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

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

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border-bottom: 4px solid var(--accent-gold);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 15px 25px 50px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-emerald);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.4rem;
    color: var(--primary-emerald);
    margin-bottom: 1rem;
}

.feature-desc {
    color: #666;
    line-height: 1.6;
}

/* --- Faculty Section --- */
.faculty-section {
    padding: 6rem 2rem;
    background-color: var(--bg-white);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cards-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.profile-card {
    background: var(--bg-offwhite);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.profile-card:hover {
    transform: translateY(-10px) rotateX(3deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.profile-image-container {
    flex-shrink: 0;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #E5E7EB;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 0 4px var(--bg-offwhite), 0 0 0 7px var(--accent-gold);
    transition: var(--transition);
    background-size: cover;
    background-position: center top;
}

.mohtamim-img {
    background-image: url('assets/ihsanullah.jpeg');
}

.teacher-img {
    background-image: url('assets/aizaz.jpeg');
}

.profile-card:hover .profile-image {
    transform: scale(1.05);
    box-shadow: 0 0 20px 8px rgba(217, 119, 6, 0.5), 0 0 0 4px var(--bg-offwhite), 0 0 0 7px var(--accent-gold);
}

.profile-text {
    display: flex;
    flex-direction: column;
}

.profile-title {
    font-size: 1.8rem;
    color: var(--primary-emerald);
    margin-bottom: 0.2rem;
}

.profile-role {
    color: var(--accent-gold);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.profile-desc {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- Lessons Section --- */
.lessons-section {
    padding: 6rem 2rem;
    background-color: var(--bg-white);
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.lesson-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.lesson-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.lesson-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.lesson-content {
    padding: 1.5rem;
    text-align: right;
}

.lesson-content h3 {
    font-family: 'Noto Nastaliq Urdu', serif;
    color: var(--primary-emerald);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.lesson-content p {
    font-family: 'Noto Nastaliq Urdu', serif;
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 2;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 6rem 2rem;
    background-color: var(--bg-offwhite);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-white);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.featured-gallery-item {
    grid-column: 1 / -1;
    aspect-ratio: 21/9;
}

@media (max-width: 768px) {
    .featured-gallery-item {
        aspect-ratio: 16/9;
    }
}

.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item:hover .gallery-media {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 1.5rem 1rem;
    background: linear-gradient(transparent, rgba(6, 78, 59, 0.9));
    transition: bottom 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

.gallery-caption {
    color: var(--accent-gold);
    font-family: var(--font-islamic);
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* --- Scroll Animations (Intersection Observer) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-0 { transition-delay: 0s; }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }
.delay-5 { transition-delay: 1.0s; }

/* --- Floating Contact --- */
.floating-contact {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.whatsapp-btn {
    background-color: #25D366;
    animation: pulseWave 2s infinite;
}

@keyframes pulseWave {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.phone-btn {
    background-color: var(--primary-emerald);
    animation: wobble 5s infinite;
}

@keyframes wobble {
    0%, 80%, 100% { transform: rotate(0deg); }
    82% { transform: rotate(-15deg); }
    84% { transform: rotate(15deg); }
    86% { transform: rotate(-15deg); }
    88% { transform: rotate(15deg); }
    90% { transform: rotate(0deg); }
}

.float-btn:hover {
    transform: scale(1.1);
}

/* --- Footer & Social --- */
.footer {
    background-color: var(--primary-emerald);
    color: white;
    padding: 4rem 2rem 2rem;
    text-align: center;
    border-top: 5px solid var(--accent-gold);
}

.footer-title {
    color: var(--accent-gold);
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* --- Cute Social Links --- */
.cute-social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem auto 3rem;
}

.cute-social-links .social-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.8rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.cute-social-links .social-icon i {
    transition: all 0.4s ease;
    z-index: 2;
}

/* Base colors for icons */
.cute-tiktok i { color: #fff; }
.cute-instagram i { color: #E1306C; }
.cute-twitter i { color: #fff; }
.cute-facebook i { color: #1877F2; }

/* TikTok Hover */
.cute-tiktok {
    box-shadow: 0 0 10px rgba(255, 0, 80, 0.2), inset 0 0 10px rgba(0, 242, 254, 0.2);
}
.cute-tiktok:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 0, 80, 0.6), inset 0 0 15px rgba(0, 242, 254, 0.6);
    border-color: rgba(255, 0, 80, 0.5);
}
.cute-tiktok:hover i {
    text-shadow: 2px 2px 0px #00f2fe, -2px -2px 0px #ff0050;
    color: white;
}

/* Instagram Hover */
.cute-instagram {
    box-shadow: 0 0 10px rgba(193, 53, 132, 0.2);
}
.cute-instagram:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 25px rgba(193, 53, 132, 0.6);
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}
.cute-instagram:hover i {
    color: white;
}

/* Twitter / X Hover */
.cute-twitter {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
.cute-twitter:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.4);
    background-color: #000;
    border-color: #333;
}
.cute-twitter:hover i {
    color: white;
}

/* Facebook Hover */
.cute-facebook {
    box-shadow: 0 0 10px rgba(24, 119, 242, 0.2);
}
.cute-facebook:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.6);
    background-color: #1877F2;
    border-color: transparent;
}
.cute-facebook:hover i {
    color: white;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3rem;
}

.developer-credit-wrapper {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.developer-credit-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ffe4e6, #fecdd3);
    color: #be123c;
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2), inset 0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.developer-credit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4), inset 0 0 0 2px #fff;
    color: #9f1239;
}

/* Map Integration */
.map-container {
    margin: 3rem auto 1rem;
    max-width: 1000px;
    width: 100%;
}

.map-title {
    color: var(--accent-gold);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-islamic);
}

.map-wrapper {
    border: 4px solid var(--accent-gold);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.map-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(217, 119, 6, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .cards-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide on small screens for simplicity, or add hamburger later */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image-container {
        margin-bottom: 1rem;
    }
    
    .floating-contact {
        bottom: 1rem;
        right: 1rem;
    }
    
    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
