/* ========================================
   Dr. Jagannath Pathak - Website Styles
   Modern, Elegant Design
   ======================================== */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #8B4513;
    --primary-dark: #5D2E0C;
    --primary-light: #D2691E;
    --secondary-color: #1a4731;
    --accent-color: #DAA520;
    --gold: #FFD700;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --bg-light: #f5f0e8;
    --gradient-primary: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    --gradient-dark: linear-gradient(135deg, #1a4731 0%, #2d5a45 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 50px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Poppins', -apple-system, sans-serif;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Prevent horizontal overflow on mobile */
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    /* Safe area padding for notched phones */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Prevent images from causing horizontal scroll */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent any element from overflowing */
.container, section, .row {
    max-width: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader {
    text-align: center;
}

.loader .sanskrit-symbol {
    font-size: 80px;
    color: var(--gold);
    animation: pulse 1.5s infinite;
}

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

/* ===== Navigation ===== */
.navbar {
    padding: 15px 0;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.nav-logo {
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 10px 18px !important;
    position: relative;
    font-size: 0.95rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    padding: 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8e0d5 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90" opacity="0.03">%E0%A5%90</text></svg>') repeat;
    background-size: 200px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 100px 0 50px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 500;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 5px;
}

.hero-years {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 500;
    border: none;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(139, 69, 19, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.4);
    color: var(--white);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary-color);
    padding: 13px 35px;
    border-radius: 50px;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    padding: 30px;
}

.hero-image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid var(--accent-color);
    border-radius: 25px;
    z-index: -1;
}

.hero-image {
    width: 100%;
    border-radius: 20px;
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

.floating-badge {
    position: absolute;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float 3s ease-in-out infinite;
}

.floating-badge i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.floating-badge span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.badge-1 {
    top: 20%;
    right: -20px;
}

.badge-2 {
    bottom: 25%;
    left: -20px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.scroll-indicator a {
    color: var(--text-light);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 15px;
    display: block;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== Section Styles ===== */
.section-padding {
    padding: 100px 0;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    margin-bottom: 30px;
}

.section-description {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

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

/* ===== About Section ===== */
.about-image-wrapper {
    position: relative;
    padding: 20px;
}

.about-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.about-image-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    transform: translate(20px, 20px);
    z-index: -1;
}

.about-content {
    padding-left: 30px;
}

.about-content .lead {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 25px;
}

.about-details {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: var(--shadow-sm);
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 3px;
}

.detail-item h5 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 3px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item p {
    margin: 0;
    font-weight: 500;
    color: var(--text-dark);
}

/* ===== Timeline Section ===== */
.timeline-section {
    background: var(--gradient-dark);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: rgba(255,255,255,0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    width: 50%;
    padding: 0 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 15px;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-content {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.timeline-content .year {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content h4 {
    color: var(--white);
    margin-bottom: 10px;
}

.timeline-content p {
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* ===== Contributions Section ===== */
.contribution-card {
    background: var(--white);
    border-radius: 20px;
    padding: 35px;
    height: 100%;
    display: flex;
    gap: 25px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.contribution-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contribution-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.contribution-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.contribution-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* ===== Statistics Section ===== */
.stats-section {
    background: var(--gradient-primary);
    padding: 80px 0;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    display: inline;
}

.stat-plus {
    font-size: 2rem;
    font-weight: 700;
}

.stat-text {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* ===== Books Section ===== */
.book-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

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

.book-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.1);
}

.book-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
}

.award-badge {
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.book-info {
    padding: 25px;
}

.book-info h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.book-year {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.book-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* ===== Awards Section ===== */
.awards-section {
    background: var(--gradient-dark);
}

.award-card {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    height: 100%;
}

.award-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.award-image {
    height: 180px;
    overflow: hidden;
}

.award-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.award-content {
    padding: 25px;
    color: var(--white);
}

.award-content h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.award-year {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.award-content p:last-child {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ===== Video Section ===== */
.video-card h4 {
    padding: 20px 20px 5px;
    margin: 0;
}

.video-card p {
    padding: 0 20px 20px;
    color: var(--text-light);
    margin: 0;
    flex-grow: 1;
}

.youtube-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* YouTube Link Cards (for videos with embedding disabled) */
.youtube-link-card {
    display: block;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-decoration: none;
}

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

.youtube-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-link-card:hover .youtube-thumbnail img {
    transform: scale(1.05);
}

.youtube-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #ff0000;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.youtube-link-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-link-text {
    text-align: center;
    padding: 15px;
    margin: 0;
    color: var(--text-dark);
    font-weight: 500;
}

/* Video Card equal heights */
.video-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ===== Gallery Section ===== */
.gallery-filter {
    margin-bottom: 30px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    margin: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

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

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 69, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay i {
    font-size: 2rem;
    color: var(--white);
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item.hidden {
    display: none;
}

/* ===== Testimonials Section ===== */
.testimonials-section {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
}

.testimonial-card {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(10px);
    text-align: center;
    height: 100%;
}

.testimonial-content {
    margin-bottom: 25px;
}

.quote-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.testimonial-content p {
    color: var(--white);
    font-size: 1rem;
    line-height: 1.8;
    font-style: italic;
}

.testimonial-audio {
    width: 100%;
    margin-top: 20px;
}

.testimonial-author h5 {
    color: var(--white);
    margin-bottom: 5px;
}

.testimonial-author p {
    color: rgba(255,255,255,0.7);
    margin: 0;
    font-size: 0.9rem;
}

/* ===== Contact Section ===== */
.contact-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-icon i {
    font-size: 2rem;
    color: var(--white);
}

.contact-card h4 {
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-light);
    margin: 0;
}

.contact-card a {
    color: var(--primary-color);
}

.links-section {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.links-section h4 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

.links-section h5 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin-bottom: 10px;
}

.links-list a {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.links-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    border-radius: 50%;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.sanskrit-quote {
    color: var(--accent-color);
    font-size: 1rem;
    line-height: 1.8;
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    margin: 0;
}

.quote-translation {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 15px;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 40px 0 25px;
}

.copyright {
    color: rgba(255,255,255,0.7);
    margin: 0;
    font-size: 0.9rem;
}

.maintainer {
    color: rgba(255,255,255,0.7);
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.maintainer-icon {
    height: 30px;
    border-radius: 50%;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: var(--white);
}

/* ===== Responsive Styles ===== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

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

    .hero-content {
        text-align: center;
        padding: 120px 0 30px;
    }

    .hero-description {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-container {
        margin-top: 40px;
    }

    .floating-badge {
        display: none;
    }

    .about-content {
        padding-left: 0;
        margin-top: 40px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .section-padding {
        padding: 70px 0;
    }

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

    .contribution-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .maintainer {
        justify-content: center;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .navbar-brand .brand-text {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        text-align: center;
    }

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

    .testimonial-card {
        padding: 25px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* ===== Lightbox Custom ===== */
.lb-outerContainer {
    border-radius: 10px;
}

.lb-dataContainer {
    padding: 10px 0;
}

/* ===== Mobile Touch & Accessibility ===== */
/* Ensure minimum touch target size (44px per Apple/Google guidelines) */
@media (max-width: 768px) {
    .nav-link,
    .filter-btn,
    .btn-primary-custom,
    .btn-outline-custom {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .links-list a {
        min-height: 44px;
        padding: 10px 0;
    }

    /* Prevent horizontal scroll */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Better tap targets for gallery */
    .gallery-item {
        min-height: 150px;
    }

    /* Improve video section on mobile */
    .video-section .row {
        gap: 20px;
    }

    .youtube-link-card {
        margin-bottom: 15px;
    }
}

/* Improve text readability on mobile */
@media (max-width: 576px) {
    body {
        font-size: 15px;
    }

    .hero-description,
    .about-content p,
    .contribution-content p {
        font-size: 0.95rem;
    }

    /* Stack contact cards better */
    .contact-card {
        margin-bottom: 15px;
    }

    /* Safe area for back to top button */
    .back-to-top {
        bottom: calc(20px + env(safe-area-inset-bottom));
        right: 20px;
    }
}

/* Footer safe area for notched phones */
.footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
}
