/* Font & Color Variables */
:root {
    --primary: #10b981 !important;
    --primary-hover: #059669 !important;
    --secondary: #0f172a !important;
    --accent: #22c55e !important;
    --light: #f8fafc !important;
    --dark: #1e293b !important;
    --gray: #64748b !important;
    --light-gray: #e2e8f0 !important;
    --radius: 12px !important;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    --transition: all 0.3s ease !important;
}

/* Global Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary) !important;
    font-weight: 700 !important;
}

section {
    padding: 5rem 0 !important;
}

.section-header {
    text-align: center !important;
    margin-bottom: 3rem !important;
}

.section-header h2 {
    font-size: 2.2rem !important;
    margin-bottom: 0.5rem !important;
}

.section-header p {
    color: var(--gray) !important;
    font-size: 1.1rem !important;
}

.section-header.light h2,
.section-header.light p {
    color: var(--light);
}

/* Calendar Section */
.calendar-section {
    padding: 4rem 0;
    background-color: var(--light);
}

.calendar-section .section-header {
    margin-bottom: 2rem;
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-modern.primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-modern.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-modern.outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

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

.btn-modern.white:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

.btn-modern.outline.dark {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-modern.outline.dark:hover {
    background-color: var(--secondary);
    color: white;
}

.btn-sm-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.5rem;
}

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

.btn-sm-modern.primary:hover {
    background-color: var(--primary-hover);
}

.btn-sm-modern.outline {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-sm-modern.outline:hover {
    background-color: var(--secondary);
    color: white;
}

/* Hero Section */
.hero-modern {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    background-color: #f4fcf7;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.12) 0%,
        rgba(5, 150, 105, 0.06) 100%
    );
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2310b981' fill-opacity='0.06' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
}

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

.hero-tag {
    display: inline-block;
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12);
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    position: relative;
}

.hero-title:after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Slider Container */
.slider-container {
    position: relative;
    z-index: 2;
}

/* Hero Image Slider */
.hero-slider {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    position: relative;
}

.hero-slider-img {
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    padding: 10px 15px;
    bottom: 20px;
    backdrop-filter: blur(5px);
    max-width: 80%;
    margin: 0 auto;
}

.carousel-caption h5 {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.carousel-caption p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.carousel-indicators {
    margin-bottom: 15px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    opacity: 0.8;
}

.carousel-indicators button.active {
    background-color: var(--primary);
    transform: scale(1.2);
    opacity: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

/* Counter Section */
.counter-section {
    padding: 3rem 0;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 3;
}

.counter-item {
    background-color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.counter-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.counter-label {
    color: var(--gray);
    font-weight: 500;
}

/* Features Section */
.features-modern-section {
    padding: 5rem 0;
    background-color: var(--secondary);
    color: white;
}

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

.feature-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-content h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-modern-section {
    padding: 5rem 0;
}

.cta-container {
    background: linear-gradient(135deg, var(--primary), #047857);
    border-radius: var(--radius);
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: var(--shadow);
}

.cta-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 500px;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* SIAK Schedule Section */
.siak-schedule-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

.siak-schedule-section .table {
    margin-bottom: 0;
}

.siak-schedule-section .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.siak-schedule-section .table td {
    vertical-align: middle;
}

.siak-schedule-section .card {
    border: none;
    border-radius: var(--radius);
}

.siak-schedule-section .btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

/* Bootstrap primary overrides to ensure consistent green theme */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--primary) !important;
}
.bg-primary {
    background-color: var(--primary) !important;
}
.border-primary {
    border-color: var(--primary) !important;
}

.siak-schedule-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Schedule Table Styles */
.schedule-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.schedule-table th,
.schedule-table td {
    vertical-align: middle;
    border: 1px solid #dee2e6;
    padding: 0.3rem;
}

.schedule-data-cell {
    height: auto !important;
    min-height: 40px;
    padding: 0 !important;
    background-color: #fff;
    vertical-align: top;
}

.schedule-cell {
    height: auto;
    border-radius: 0.25rem;
    margin-bottom: 2px;
}

.schedule-cell:last-child {
    margin-bottom: 0;
}

.schedule-content {
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
    padding: 4px;
}

.schedule-content .fw-bold {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.schedule-content .small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.time-cell {
    min-width: 80px;
    font-size: 0.85rem;
    white-space: nowrap;
    text-align: center;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 9;
    background-color: #fff;
    border-right: 2px solid #e2e8f0;
    min-width: 100px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.sticky-capacity {
    position: sticky;
    left: 100px;
    z-index: 9;
    background-color: #fff;
    border-right: 2px solid #e2e8f0;
    min-width: 80px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

/* Header Styles */
.header-row {
    position: sticky;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-days {
    top: 0;
    z-index: 12;
}

.header-days th {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
    padding: 1rem 0.5rem;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.header-times {
    top: 60px;
    z-index: 11;
}

.header-times th {
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.schedule-row:hover {
    background-color: rgba(16, 185, 129, 0.08);
}

.schedule-row:hover .sticky-col,
.schedule-row:hover .sticky-capacity {
    background-color: #f8fafc;
}

.schedule-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.schedule-cell:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Scroll Button Styles */
.scroll-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.scroll-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Legend Styles */
.legend-item {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.legend-color {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search Form Styles */
.search-form {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-form .input-group {
    max-width: 400px;
}

.search-form .form-control {
    border-radius: 50px 0 0 50px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}

.search-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.search-form .btn-outline-secondary {
    border-radius: 50px;
    padding: 0.75rem;
    margin-left: 0.5rem;
}

.search-form .btn-outline-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Table Wrapper Styles */
.table-wrapper {
    position: relative;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.schedule-table-container {
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    section {
        padding: 3rem 0;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .counter-value {
        font-size: 2rem;
    }

    .section-header h2,
    .cta-content h2 {
        font-size: 1.8rem;
    }

    .counter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-slider-img {
        height: 300px;
    }

    .carousel-caption {
        display: block !important;
        padding: 8px;
        bottom: 10px;
        max-width: 90%;
    }

    .carousel-caption h5 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .carousel-caption p {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 30px;
        height: 30px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 576px) {
    .search-form .input-group {
        max-width: 100%;
    }
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-text {
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: #f3f3f3;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress-bar {
    height: 100%;
    background: #10b981;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

/* Period Filter Styles */
.period-filter {
    min-width: 300px;
}

.period-filter select {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    background-color: white;
    transition: all 0.2s;
}

.period-filter select:hover {
    border-color: #cbd5e1;
}

.period-filter select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}
