/**
 * Theme Name: Buddys Billiards Academy
 * Theme URI: https://buddys.co.in
 * Author: Buddys Billiards Academy
 * Author URI: https://buddys.co.in
 * Description: Modern responsive theme for Buddys Billiards Academy
 * Version: 2.0.0
 * License: GPL v2 or later
 * Text Domain: buddys-modern
 */

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #0f3460;
    --accent-color: #e94560;
    --text-light: #ffffff;
    --text-dark: #333333;
    --gray-bg: #f5f5f5;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--text-light);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
    background: #d63e58;
}

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

.btn-outline:hover {
    background: var(--accent-color);
}

/* Header */
.site-header {
    background: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Site Logo */
.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo img {
    max-height: 45px;
    width: auto;
}

.site-logo span {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Desktop Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 5px 0;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100%;
    background: var(--primary-color);
    z-index: 1000;
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 20px;
}

.mobile-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 10px 0;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-image: url('assets/img/main_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 120px 20px 80px;
    margin-top: 0;
}

/* Dark overlay using pseudo-element */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85), rgba(15, 52, 96, 0.85));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Hero Slider Section */
.hero-slider-section {
    width: 100%;
    height: 60vh;
    min-height: 450px;
    max-height: 550px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.hero-slider {
    width: 100%;
    height: 100%;
}

.hero-slider .swiper-wrapper {
    height: 100%;
}

.hero-slider .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

/* Different positioning for specific slides */
.hero-slider .swiper-slide:nth-child(1) img {
    object-position: center 30%;
}
.hero-slider .swiper-slide:nth-child(2) img {
    object-position: center 40%;
}
.hero-slider .swiper-slide:nth-child(3) img {
    object-position: center 45%;
}
.hero-slider .swiper-slide:nth-child(4) img {
    object-position: center 50%;
}
.hero-slider .swiper-slide:nth-child(5) img {
    object-position: center 35%;
}
.hero-slider .swiper-slide:nth-child(6) img {
    object-position: center 40%;
}
.hero-slider .swiper-slide:nth-child(7) img {
    object-position: center 30%;
}
.hero-slider .swiper-slide:nth-child(8) img {
    object-position: center 50%;
}
.hero-slider .swiper-slide:nth-child(9) img {
    object-position: center 40%;
}
.hero-slider .swiper-slide:nth-child(10) img {
    object-position: center 35%;
}

.hero-slider .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    padding: 60px 20px 30px;
    text-align: center;
    z-index: 10;
}

.hero-slider .slide-caption h3 {
    font-size: 28px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-slider .slide-caption p {
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.4);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05);
}

.hero-slider .swiper-button-prev:after,
.hero-slider .swiper-button-next:after {
    font-size: 18px;
}

.hero-slider .swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
    width: 10px;
    height: 10px;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}

/* Page Hero */
.page-hero {
    min-height: 40vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 120px 20px 60px;
    margin-top: 0;
}

.page-hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Content Section */
.content-section {
    padding: 60px 0;
}

.content-box {
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    color: white;
}

.content-box p {
    margin-bottom: 1em;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
    background: var(--gray-bg);
}

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

.feature-card {
    background: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: 15px;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

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

.feature-icon img {
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Tournament Hero Slider */
.tournament-hero-slider {
    width: 100%;
    height: 80vh;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.tournament-hero {
    width: 100%;
    height: 100%;
}

.tournament-hero .swiper-slide {
    position: relative;
}

.tournament-hero .swiper-slide img {
    width: 100%;
    height: 80vh;
    min-height: 500px;
    object-fit: cover;
}

.tournament-hero .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 60px 20px 30px;
    text-align: center;
}

.tournament-hero .slide-caption h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.tournament-hero .slide-caption p {
    font-size: 18px;
}

.tournament-hero .swiper-button-prev,
.tournament-hero .swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.tournament-hero .swiper-button-prev:after,
.tournament-hero .swiper-button-next:after {
    font-size: 20px;
}

.tournament-hero .swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

.tournament-hero .swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info img {
    max-height: 60px;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-icons a {
    color: var(--text-light);
    font-size: 24px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    
    .site-logo span {
        font-size: 16px;
    }
    
    .site-logo img {
        max-height: 35px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .hero-slider-section {
        height: 45vh;
        min-height: 320px;
        margin-top: 70px;
    }
    
    .hero-slider .slide-caption h3 {
        font-size: 16px;
    }
    
    .hero-slider .slide-caption p {
        font-size: 11px;
    }
    
    .hero-slider .slide-caption {
        padding: 40px 15px 20px;
    }
    
    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        width: 30px;
        height: 30px;
    }
    
    .hero-slider .swiper-button-prev:after,
    .hero-slider .swiper-button-next:after {
        font-size: 12px;
    }
    
    .page-hero h1 {
        font-size: 32px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .tournament-hero-slider {
        height: 50vh;
        min-height: 300px;
        margin-top: 70px;
    }
    
    .tournament-hero .swiper-slide img {
        height: 50vh;
        min-height: 300px;
    }
    
    .tournament-hero .slide-caption h3 {
        font-size: 20px;
    }
    
    .tournament-hero .slide-caption p {
        font-size: 14px;
    }
    
    .tournament-hero .swiper-button-prev,
    .tournament-hero .swiper-button-next {
        width: 35px;
        height: 35px;
    }
}
/* Gallery Page - Mobile Responsive Fix */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

/* Mobile specific gallery styles */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .gallery-item img {
        height: auto !important;
        min-height: 200px !important;
        max-height: 300px !important;
    }
}

/* For very small phones */
@media (max-width: 480px) {
    .gallery-grid {
        gap: 12px !important;
    }
    
    .gallery-item img {
        min-height: 180px !important;
    }
}