/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #ff6b35;
    --secondary-color: #2e86ab;
    --accent-color: #f18f01;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --success-color: #5cb85c;
    --error-color: #d9534f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-overflow-scrolling: touch;
}

/* Optimize scrolling performance */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f8f8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: var(--dark-color);
}

ul {
    list-style: none;
}

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

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

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.btn:hover {
    background: #e55a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

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

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    transition: padding 0.3s ease-out;
    transform: translateZ(0);
    backface-visibility: hidden;
}

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

.logo {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 50%;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
    display: inline-block;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav ul li a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

nav ul li a:hover::after {
    width: 100%;
}


/* Hero Section */
.hero {
    height: 80vh;
    background: 
        linear-gradient(
            135deg,
            rgba(255, 107, 53, 0.2) 0%,
            rgba(46, 134, 171, 0.15) 50%,
            rgba(0, 0, 0, 0.3) 100%
        ),
        url('ग्रामपंचायत.jpg') no-repeat center center/contain;
    background-attachment: scroll;
    background-position: center center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 90px;
    position: relative;
    overflow: hidden;
    filter: brightness(1.1) contrast(1.2) saturate(1.1);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* Use fixed attachment only on desktop with GPU acceleration */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    .hero {
        background-attachment: fixed;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero:hover {
        filter: brightness(1.2) contrast(1.3) saturate(1.15);
        background-size: contain, contain;
    }
}

/* Add subtle image enhancement overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    z-index: 1;
    mix-blend-mode: overlay;
}

/* Ensure content is above overlay */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem 3rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform: translateZ(0);
    will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: contentFloat 6s ease-in-out infinite;
    }
}

@keyframes contentFloat {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: translateY(-5px);
        box-shadow: 
            0 15px 40px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff6b35, #f18f01, #ffd700, #ff6b35);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    cursor: default;
}

.hero h2:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    text-shadow: 0 0 40px rgba(255, 107, 53, 0.8);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
    background: linear-gradient(90deg, #ffffff, #e8f4f8, #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Leadership Section */
.leadership {
    padding: 5rem 2rem;
    background-color: white;
}

.leaders-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.leader-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.3s ease;
    width: 280px;
    text-align: center;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    backface-visibility: hidden;
}

.leader-card.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.leader-card:hover {
    transform: translate3d(0, -10px, 0) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

.leader-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
}

.leader-card p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.main-leader {
    width: 320px;
}

/* Team Section */
.team {
    padding: 5rem 2rem;
    background-color: #f8f8f8;
}

.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.3s ease;
    overflow: hidden;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    backface-visibility: hidden;
}

.team-member.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.team-member:hover {
    transform: translate3d(0, -5px, 0) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.team-member-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.team-member:hover .team-member-image img {
    transform: translateZ(0) scale(1.1);
}

.team-member h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.team-member p {
    color: var(--secondary-color);
    font-weight: 500;
    display: inline-block;
    padding: 3px 12px;
    background-color: rgba(255, 107, 53, 0.1);
    border-radius: 20px;
}

/* Social Media Videos Section */
.social-videos {
    padding: 5rem 2rem;
    background-color: #f8f8f8;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--dark-color);
}

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

.video-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.3s ease;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    backface-visibility: hidden;
}

.video-card.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.video-card:hover {
    transform: translate3d(0, -10px, 0) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.video-wrapper {
    position: relative;
    padding-bottom: 125%; /* Instagram aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
    text-align: center;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.video-info p {
    color: var(--dark-color);
    font-size: 0.95rem;
}

/* Projects Section */
.projects {
    padding: 5rem 2rem;
    background-color: white;
}

.project {
    margin-bottom: 4rem;
    background: #f8f8f8;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    backface-visibility: hidden;
}

.project.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.project h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    text-align: center;
}

/* Slideshow styles */
.slideshow-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.slide {
    display: none;
    width: 100%;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    vertical-align: middle;
    border-radius: 8px;
    transition: transform 0.6s ease-out;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide img:hover {
    transform: translateZ(0) scale(1.02);
}

.slide.active {
    display: block;
    animation: fadeEffect 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeEffect {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: 500;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-50%);
    opacity: 0.7;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.slideshow-container:hover .prev,
.slideshow-container:hover .next {
    opacity: 1;
}

/* The dots/bullets/indicators */
.slide-dots {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.dot.active, .dot:hover {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

.project p {
    text-align: center;
    font-size: 1.1rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background-color: #f8f8f8;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Floating Contact Message */
.floating-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: pulseBlink 2s ease-in-out infinite;
}

.floating-contact-link {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 180px;
}

.floating-contact-link:hover {
    background: #e55a2a;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
    animation: none;
}

.floating-contact-link i {
    font-size: 14px;
    margin-right: 6px;
    flex-shrink: 0;
}

.floating-text {
    line-height: 1.3;
    text-align: left;
}

@keyframes pulseBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(0.98);
    }
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-contact-link {
        padding: 6px 10px;
        font-size: 10px;
        max-width: 160px;
    }
    
    .floating-contact-link i {
        font-size: 12px;
        margin-right: 5px;
    }
}

/* Media Queries */
/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
        transition: padding 0.3s ease-out;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero {
        height: 60vh;
        margin-top: 150px;
        background-attachment: scroll;
        background-size: contain;
        background-position: center center;
    }
    
    /* Disable animations on mobile for better performance */
    .leader-card,
    .team-member,
    .video-card,
    .project {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    
    .hero-content {
        padding: 1rem;
        margin: 0 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .leader-card, .main-leader {
        width: 100%;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .video-wrapper {
        padding-bottom: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
        margin-top: 180px;
        background-size: contain, contain;
        background-position: center center;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }
}
