/*
Theme Name: BMKG Provincial Template
Description: Template WordPress untuk BMKG dengan kustomisasi otomatis per provinsi Indonesia
Version: 1.0.0
Author: BMKG Development Team
Text Domain: bmkg-template
*/

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* CSS Variables for Provincial Customization */
:root {
    --bmkg-primary-color: #1E40AF;
    --bmkg-secondary-color: #059669;
    --bmkg-accent-color: #F59E0B;
    --bmkg-danger-color: #DC2626;
    --bmkg-warning-color: #F59E0B;
    --bmkg-success-color: #059669;
    --bmkg-text-dark: #1F2937;
    --bmkg-text-light: #6B7280;
    --bmkg-bg-light: #F9FAFB;
    --bmkg-border-color: #E5E7EB;
    --bmkg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --bmkg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bmkg-text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--bmkg-text-light);
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.section-header h2 {
    color: var(--bmkg-primary-color);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: var(--bmkg-shadow-lg);
}

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

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

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, var(--bmkg-primary-color) 0%, #3B82F6 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--bmkg-shadow);
}

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

.site-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 50px;
    height: 50px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.main-navigation a:hover {
    opacity: 0.8;
}

/* ===== HERO SECTION ===== */
.bmkg-hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.8) 0%, 
        rgba(59, 130, 246, 0.6) 50%, 
        rgba(5, 150, 105, 0.8) 100%);
}

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

.hero-content .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.hero-weather-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== QUICK INFO CARDS ===== */
.bmkg-quick-info {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding-bottom: 4rem;
}

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

.info-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--bmkg-shadow-lg);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--bmkg-primary-color);
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bmkg-primary-color), var(--bmkg-secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.info-card .card-icon i {
    font-size: 1.5rem;
    color: white;
}

.info-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--bmkg-text-dark);
}

.info-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bmkg-primary-color);
    margin-bottom: 0.25rem;
}

.info-card span {
    font-size: 0.875rem;
    color: var(--bmkg-text-light);
}

/* Specific card styling */
.weather-card {
    border-top-color: var(--bmkg-success-color);
}

.alert-card {
    border-top-color: var(--bmkg-warning-color);
}

.disaster-card {
    border-top-color: var(--bmkg-danger-color);
}

.office-card {
    border-top-color: var(--bmkg-accent-color);
}

/* ===== FORECAST SECTION ===== */
.bmkg-forecast {
    padding: 4rem 0;
    background: white;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.forecast-day {
    background: var(--bmkg-bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.forecast-day:hover {
    transform: translateY(-3px);
    border-color: var(--bmkg-primary-color);
}

.forecast-day.today {
    background: var(--bmkg-primary-color);
    color: white;
}

.forecast-date {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.forecast-icon {
    font-size: 2rem;
    margin: 1rem 0;
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.temp-max {
    font-weight: 700;
    color: var(--bmkg-text-dark);
}

.temp-min {
    color: var(--bmkg-text-light);
}

/* ===== WARNING SECTION ===== */
.bmkg-warnings {
    padding: 4rem 0;
    background: var(--bmkg-bg-light);
}

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

.warning-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--bmkg-shadow);
    border-left: 4px solid var(--bmkg-warning-color);
}

.warning-card.high-priority {
    border-left-color: var(--bmkg-danger-color);
    background: #FEF2F2;
}

.warning-card.medium-priority {
    border-left-color: var(--bmkg-warning-color);
    background: #FFFBEB;
}

.warning-card.low-priority {
    border-left-color: var(--bmkg-success-color);
    background: #F0FDF4;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.warning-icon {
    font-size: 1.25rem;
}

.warning-title {
    font-weight: 600;
    margin: 0;
}

.warning-time {
    font-size: 0.875rem;
    color: var(--bmkg-text-light);
    margin-bottom: 0.5rem;
}

/* ===== NEWS SECTION ===== */
.bmkg-news {
    padding: 4rem 0;
    background: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--bmkg-shadow);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--bmkg-shadow-lg);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    background: var(--bmkg-primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-title a {
    color: var(--bmkg-text-dark);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--bmkg-primary-color);
}

.news-excerpt {
    color: var(--bmkg-text-light);
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--bmkg-text-light);
}

.news-cta {
    text-align: center;
}

/* ===== CLIMATE DATA SECTION ===== */
.bmkg-climate-data {
    padding: 4rem 0;
    background: var(--bmkg-bg-light);
}

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

.climate-stat {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--bmkg-shadow);
}

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

.stat-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.875rem;
    color: var(--bmkg-text-light);
}

/* ===== EMERGENCY CONTACTS ===== */
.bmkg-emergency {
    padding: 4rem 0;
    background: var(--bmkg-text-dark);
    color: white;
}

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

.emergency-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.emergency-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bmkg-accent-color);
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-phone {
    font-weight: 500;
    color: white;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bmkg-text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: var(--bmkg-accent-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-content .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .info-grid,
    .forecast-container,
    .warnings-grid,
    .news-grid,
    .climate-stats,
    .emergency-contacts {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .bmkg-hero {
        height: 500px;
    }
    
    .info-card,
    .forecast-day,
    .warning-card,
    .news-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
a:focus,
button:focus {
    outline: 2px solid var(--bmkg-accent-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .site-footer,
    .hero-actions,
    .btn {
        display: none;
    }
    
    .bmkg-hero {
        height: auto;
        background: white;
        color: black;
    }
    
    .hero-overlay {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== CULTURAL PATTERNS ===== */
.cultural-pattern {
    position: relative;
}

.cultural-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: repeat;
    background-size: 100px 100px;
    opacity: 0.05;
    pointer-events: none;
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
