/**
 * Frontend Styles  
 * Modern frontend styling for Desa Blanakan website
 * Clean CSS without @apply directives
 */

/* Layout Components */
.hero-section {
    position: relative;
    background: linear-gradient(to bottom right, rgba(4, 106, 174, 0.9), #046aae);
    color: white;
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 5rem 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

/* Navigation */
.nav-link {
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #046aae;
}

.nav-link-active {
    color: #046aae;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    background-color: white;
    transform: translateX(100%);
    transition: transform 0.3s;
}

.dark .mobile-menu {
    background-color: #111827;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Cards */
.feature-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s;
}

.dark .feature-card {
    background-color: #1f2937;
    border-color: #374151;
}

.feature-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.news-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.dark .news-card {
    background-color: #1f2937;
    border-color: #374151;
}

.service-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.dark .service-card {
    background-color: #1f2937;
    border-color: #374151;
}

.service-card:hover {
    border-color: #046aae;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #046aae;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: rgba(4, 106, 174, 0.9);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #e5e7eb;
    color: #1f2937;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dark .btn-secondary {
    background-color: #374151;
    color: #e5e7eb;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.dark .btn-secondary:hover {
    background-color: #4b5563;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid #046aae;
    color: #046aae;
    background-color: transparent;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: #046aae;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.dark .form-label {
    color: #d1d5db;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #111827;
}

.dark .form-input {
    border-color: #4b5563;
    background-color: #1f2937;
    color: #f9fafb;
}

.form-input:focus {
    border-color: #046aae;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 106, 174, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #111827;
    resize: none;
}

.dark .form-textarea {
    border-color: #4b5563;
    background-color: #1f2937;
    color: #f9fafb;
}

.form-textarea:focus {
    border-color: #046aae;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 106, 174, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #111827;
}

.dark .form-select {
    border-color: #4b5563;
    background-color: #1f2937;
    color: #f9fafb;
}

.form-select:focus {
    border-color: #046aae;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 106, 174, 0.1);
}

/* Sections */
.section {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 5rem 0;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #111827;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.dark .section-title {
    color: #f9fafb;
}

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    color: #4b5563;
    max-width: 42rem;
    margin: 0 auto;
}

.dark .section-subtitle {
    color: #9ca3af;
}

/* Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* Hero Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Base state: strictly hidden to prevent text overlap */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.carousel-slide.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

/* Carousel Content Animation */
.carousel-slide:not(.active) .carousel-title,
.carousel-slide:not(.active) .carousel-subtitle,
.carousel-slide:not(.active) .carousel-cta {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    animation: none !important;
}

.carousel-slide.active .carousel-title {
    animation: slideInUp 0.6s ease-out forwards;
}

.carousel-slide.active .carousel-subtitle {
    animation: slideInUp 0.6s ease-out 0.15s forwards;
}

.carousel-slide.active .carousel-cta {
    animation: slideInUp 0.6s ease-out 0.3s forwards;
}

/* Carousel Navigation */
.carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Progress Bar Animation */
.carousel-progress {
    transition: width 0.1s ease-linear;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-slide .container .max-w-2xl {
        text-align: center;
    }
    
    .carousel-slide h2 {
        font-size: 2rem;
    }
    
    .carousel-slide p {
        font-size: 1rem;
    }
}