/**
 * AgroEduPark - Design System
 * Modern Agricultural Education Platform
 */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors - Agriculture Theme */
    --primary: #2D7D46;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --primary-rgb: 45, 125, 70;

    /* Accent Colors */
    --accent: #FFC107;
    --accent-light: #FFD54F;
    --accent-dark: #FF8F00;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Background Colors */
    --bg-primary: #F1F8E9;
    --bg-secondary: #E8F5E9;
    --bg-dark: #1A1A2E;

    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --text-light: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2D7D46 0%, #4CAF50 100%);
    --gradient-accent: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    --gradient-hero: linear-gradient(135deg, rgba(45, 125, 70, 0.9) 0%, rgba(27, 94, 32, 0.95) 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(45, 125, 70, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;

    /* Typography */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Spacing */
    --container-max: 1280px;
    --header-height: 80px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

ul,
ol {
    list-style: none;
}

/* ===== UTILITIES ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition);
}

.header.transparent {
    background: transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--white);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.header.scrolled .logo {
    color: var(--primary);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    padding: 0.5rem 0;
}

.header.scrolled .nav-link {
    color: var(--text-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent);
}

.header.scrolled .nav-link:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--gradient-accent);
    color: var(--gray-900);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-fast);
}

.header.scrolled .menu-toggle span {
    background: var(--primary);
}

/* Header Social Icons */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.header-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.header-social a:hover {
    background: var(--accent);
    color: var(--gray-900);
    transform: scale(1.1);
}

.header.scrolled .header-social a {
    background: var(--bg-secondary);
    color: var(--primary);
}

.header.scrolled .header-social a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    color: var(--accent);
}

.hero-description {
    font-size: var(--font-size-xl);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(45, 125, 70, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 125, 70, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--gray-900);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: var(--font-size-lg);
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Teacher Card */
.teacher-card {
    text-align: center;
    padding: 2rem;
}

.teacher-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 4px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
}

.teacher-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.teacher-position {
    color: var(--primary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
}

.teacher-subjects {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.teacher-homeroom {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-top: 0.75rem;
}

/* Product Card */
.product-card {
    position: relative;
    cursor: pointer;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 125, 70, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-overlay-text {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.product-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary);
}

/* Material Card */
.material-card .card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.material-card .meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.material-card .card-excerpt {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.badge-primary {
    background: var(--bg-secondary);
    color: var(--primary);
}

.badge-accent {
    background: rgba(255, 193, 7, 0.15);
    color: var(--accent-dark);
}

/* ===== GRIDS ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== SLIDER ===== */
.slider {
    position: relative;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.slider-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.slider-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-arrow.prev {
    left: 2rem;
}

.slider-arrow.next {
    right: 2rem;
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.fab-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--gradient-accent);
    color: var(--gray-900);
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.fab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: var(--shadow-lg);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0.2);
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.7;
}

.footer-heading {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-500);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    transition: var(--transition-fast);
    background: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 125, 70, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== FILTERS ===== */
.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    min-width: 150px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.625rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
}

/* ===== PAGE HERO ===== */
.page-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.page-hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-hero-subtitle {
    font-size: var(--font-size-xl);
    opacity: 0.9;
}

/* ===== LOADING & EMPTY STATES ===== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Prevent horizontal overflow */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }

    .header {
        max-width: 100vw;
        width: 100%;
    }

    .header-inner {
        max-width: 100%;
        width: 100%;
    }

    .slider,
    .slider-track,
    .slider-slide,
    .hero,
    .hero-bg,
    .hero-content,
    .section,
    .container {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-content {
        width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateX(100%);
        transition: var(--transition);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-link {
        color: var(--text-primary) !important;
        font-size: var(--font-size-lg);
        padding: 0.75rem 0;
    }

    .nav-cta {
        margin-top: 1rem;
    }

    .header {
        overflow: visible;
    }

    .header-inner {
        overflow: visible;
    }

    .menu-toggle {
        display: flex !important;
        flex-shrink: 0;
        z-index: 1001;
        padding: 0.75rem;
        margin-right: 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: var(--radius);
        border: none;
        cursor: pointer;
    }

    .header.scrolled .menu-toggle {
        background: var(--bg-secondary);
    }

    .header-social {
        display: none !important;
    }

    .logo {
        font-size: var(--font-size-base);
    }

    .logo img {
        width: 32px !important;
        height: 32px !important;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .section {
        padding: 3rem 0;
    }

    .page-hero {
        height: auto;
        min-height: 350px;
        padding-top: calc(var(--header-height) + 1rem);
        padding-bottom: 2rem;
    }

    .page-hero-title {
        font-size: var(--font-size-2xl);
    }

    .page-hero-subtitle {
        font-size: var(--font-size-base);
        padding: 0 1rem;
    }

    .filter-bar {
        flex-direction: column;
    }

    .slider-arrow {
        display: none;
    }

    /* Fix inline grid styles on index.html */
    .grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Sambutan Kajur Section Mobile Fix */
    #sambutan-kajur .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    #sambutan-kajur .grid>div:last-child {
        text-align: center;
    }

    #sambutan-kajur .section-title {
        text-align: center !important;
    }

    #sambutan-kajur blockquote {
        text-align: center;
        border-left: none !important;
        border-top: 4px solid var(--primary);
        padding-left: 0 !important;
        padding-top: 1.5rem;
    }

    /* Hubungi Kami Section Mobile Fix */
    #hubungi-kami .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #hubungi-kami .card[style*="min-height: 450px"] {
        min-height: 300px !important;
    }

    #hubungi-kami iframe {
        min-height: 300px !important;
    }

    /* Contact Social Media Buttons */
    #hubungi-kami .card div[style*="display: flex"][style*="gap: 1rem"][style*="flex-wrap: wrap"] {
        justify-content: center;
    }

    /* CTA Section Mobile Fix */
    .section[style*="gradient-primary"] h2 {
        font-size: var(--font-size-2xl) !important;
    }

    .section[style*="gradient-primary"] p {
        font-size: var(--font-size-base) !important;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-base);
        padding: 0 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-badge {
        font-size: var(--font-size-sm);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    /* About Section Image Fix */
    .section img[style*="border-radius"] {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .fab {
        bottom: 1rem;
        right: 1rem;
    }

    .fab-btn span {
        display: none;
    }

    .fab-btn {
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
    }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}