/**
 * PadelZone - Main Stylesheet
 * Professional UI/UX Design
 */

/* ===== RESET & VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #00A86B;
    --primary-dark: #008556;
    --primary-light: #00C97D;
    --secondary-color: #2C3E50;
    --accent-color: #F39C12;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--white);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Improve image quality rendering - use high quality interpolation */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
    /* Hardware acceleration for better performance */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ===== SPLASH SCREEN ===== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: var(--white);
    animation: fadeInUp 0.8s ease;
}

.splash-logo {
    font-size: 4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: -2px;
    animation: pulse 2s ease infinite;
}

.splash-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

.splash-loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.navbar.scrolled .nav-link {
    color: var(--text-dark);
}

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

.navbar.scrolled .btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
    transition: var(--transition-fast);
}

.navbar.scrolled .nav-logo {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

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

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-light);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.navbar.scrolled .mobile-toggle span {
    background: var(--text-dark);
}

/* ===== NAVBAR DROPDOWN ===== */
.nav-menu .nav-item-dropdown {
    position: relative !important;
    display: inline-block;
}

.nav-item-dropdown > .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu .dropdown-menu {
    display: none;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    min-width: 200px;
    z-index: 9999 !important;
    margin-top: 0.5rem;
    list-style: none;
    padding: 0.5rem 0;
}

/* Hover removed - now using click to toggle via JavaScript */

.nav-menu .dropdown-menu li {
    margin: 0;
    display: block;
}

.nav-menu .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-menu .dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.nav-menu .dropdown-menu a i {
    font-size: 1rem;
    width: 1.25rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    font-size: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: var(--white);
    animation: fadeInLeft 1s ease;
}

.hero-image {
    animation: fadeInRight 1s ease;
    position: relative;
    margin-right: calc(-1 * var(--spacing-md));
}

.hero-title {
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== SECTION STYLES ===== */
.section {
    padding: var(--spacing-xl) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== RESPONSIVE ===== */

/* ===== LAPTOP & MEDIUM SCREENS (1024px - 1440px) ===== */
@media (max-width: 1440px) and (min-width: 769px) {
    /* Reduce base font size for laptops */
    html {
        font-size: 14px;
    }

    /* Hero section - smaller for laptops */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Section titles */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

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

    .section-subtitle {
        font-size: 1rem;
    }

    /* Reduce spacing */
    section {
        padding: 4rem 0;
    }

    /* Ensure all containers have consistent padding */
    .container,
    .nav-container,
    .hero-container {
        max-width: 1200px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Feature icons smaller */
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    /* Feature cards more compact */
    .feature-card {
        padding: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.25rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    /* Court cards */
    .court-image {
        height: 200px;
    }

    .court-content {
        padding: 1.25rem;
    }

    .court-content h3 {
        font-size: 1.15rem;
    }

    .court-content p {
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    /* Contact section */
    .contact-item h3 {
        font-size: 1.25rem;
    }

    .contact-item p {
        font-size: 0.95rem;
    }

    /* Reduce footer padding */
    footer {
        padding: 3rem 0 1.5rem;
    }

    /* Navbar */
    .navbar {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }
}

/* ===== TABLETS AND MOBILE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 1rem 1rem;  /* ✅ REDUCED: dari 2rem 1.5rem jadi 1rem 1rem */
        box-shadow: var(--shadow-xl);
        transition: var(--transition-normal);
        overflow-y: auto;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.25rem;  /* ✅ REDUCED: dari 0.75rem jadi 0.25rem */
    }

    .nav-menu li {
        margin: 0;
    }

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

    .nav-menu .nav-link,
    .nav-menu a.nav-link {
        color: var(--text-dark) !important;
        width: 100%;
        padding: 0.6rem 1rem;  /* ✅ REDUCED: dari 0.75rem jadi 0.6rem */
        display: block;
    }

    .nav-menu .btn {
        background: var(--primary-color) !important;  /* ✅ FIXED: Paksa background hijau */
        color: var(--white) !important;
        padding: 0.6rem 1rem;
        width: 100%;  /* ✅ Full width di mobile */
        display: block;  /* ✅ Block display */
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .hero-content,
    .hero-image {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        padding-right: 0;
        margin-right: 0;
    }

    .hero-image {
        order: -1;
        margin-right: 0;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
    }

    .hero-buttons {
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Hero text adjustments */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

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

    /* Button adjustments */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Section padding */
    section {
        padding: 3rem 0;
    }

    /* Section titles */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Cards grid - 2 columns on tablet */
    .court-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Card adjustments */
    .court-card h3,
    .feature-card h3 {
        font-size: 1rem;
    }

    .court-card p,
    .feature-card p {
        font-size: 0.875rem;
    }

    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* ===== EXTRA SMALL MOBILE ===== */
@media (max-width: 480px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Cards grid - 1 column on small mobile */
    .court-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }

    /* Smaller buttons */
    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Navbar adjustments */
    .navbar {
        padding: 0.75rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Container */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.bg-light { background: var(--light-bg); }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
