/* Additional styles specific to the site */

html {
    font-size: 14px;
    scroll-behavior: smooth;
}


@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.content-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

    .content-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    }

.card-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, var(--accent-green), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

    .card-image::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    }

.card-content {
    padding: 25px;
}

.card-category {
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-description {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 60px 0;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Custom Phrae Tourism specific styles */
.weather-widget {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.fab {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(45, 125, 50, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
}

    .fab:hover {
        transform: scale(1.1);
        background: var(--light-green);
    }

/* Loading spinner enhancement */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.loading-text {
    margin-left: 15px;
    color: var(--primary-green);
    font-weight: 500;
}

/* Error states */
.error-container {
    text-align: center;
    padding: 50px;
    color: #666;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Development notice */
.development-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: #666;
    background: rgba(0,0,0,0.02);
    border-radius: 15px;
    margin: 20px 0;
}

    .development-notice .icon {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.7;
    }

/* Enhanced card interactions */
.content-card {
    will-change: transform;
}

    .content-card:active {
        transform: translateY(-8px) scale(1.01);
    }

/* Scroll buttons - ensuring perfect circles */
.scroll-btn {
    background: var(--primary-green) !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    box-shadow: 0 4px 15px rgba(45, 125, 50, 0.3) !important;
    transition: all 0.3s ease;
    flex-shrink: 0 !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
}

    .scroll-btn:hover {
        background: var(--light-green) !important;
        transform: scale(1.1);
    }

    .scroll-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* Mobile responsive scroll buttons */
@media (max-width: 640px) {
    .scroll-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
        min-width: 35px !important;
        min-height: 35px !important;
    }
}

/* Print styles */
@media print {
    .header,
    .bottom-taskbar,
    .fab,
    .weather-widget {
        display: none !important;
    }

    .main-content {
        margin-top: 0 !important;
    }

    .content-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
.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;
}

/* Focus indicators */
.nav-link:focus,
.taskbar-item:focus,
.lang-btn:focus,
.scroll-btn:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #1b5e20;
        --light-green: #2e7d32;
        --text-dark: #000000;
        --text-light: #424242;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
