﻿/* ============================================================
   INDEX PAGE - Bayawan City Council | Modern 2025 Design
   ============================================================ */

:root {
    --primary-green: #14532d;
    --primary-green-light: #1f7a3d;
    --accent-orange: #f08a24;
    --accent-orange-dark: #cf6d09;
    --text-dark: #0f172a;
    --text-body: #374151;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-subtle: rgba(240, 138, 36, 0.12);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ---------- Section Shell & Wrapper ---------- */
.section-shell {
    width: 100%;
    padding: 80px 0;
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Section Header ---------- */
.section-kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-orange-dark);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.15;
    margin: 0 0 40px;
    letter-spacing: -0.02em;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header .section-title {
    margin: 0;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.view-all-link:hover {
    color: var(--primary-green-light);
    transform: translateX(4px);
}

.view-all-link::after {
    content: '→';
    transition: transform 0.2s;
}

.view-all-link:hover::after {
    transform: translateX(4px);
}

/* ---------- Policy Section ---------- */
.policies-section {
    background: var(--bg-light);
    position: relative;
}

.policies-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.policy-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.policy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.policy-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.policy-card:hover::before {
    transform: scaleX(1);
}

.policy-card .doc-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-orange-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.policy-card .doc-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-orange);
    border-radius: 50%;
}

.policy-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    max-height: 4.2em;
}

.policy-card .card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(240, 138, 36, 0.3);
}

.btn-view:hover {
    background: linear-gradient(135deg, var(--accent-orange-dark), #b45309);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 138, 36, 0.4);
}

/* ---------- Site Tagline ---------- */
.site-tagline {
    text-align: center;
    padding: 60px 24px 40px;
    background: transparent;
    position: relative;
}

.site-tagline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-orange));
    border-radius: 2px;
}

.site-tagline h1 {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.site-tagline h1::before,
.site-tagline h1::after {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-green-light));
}

.site-tagline h1::after {
    background: linear-gradient(90deg, var(--primary-green-light), transparent);
}

/* ---------- Section Display Style ---------- */
.section-display {
    margin-bottom: 32px;
}

.section-display .italic-line {
    display: block;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-style: italic;
    font-weight: 400;
    color: var(--primary-green-light);
    line-height: 1.2;
    margin-bottom: 4px;
}

.section-display .bold-line {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--primary-green);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ---------- Bulletin Section ---------- */
.bulletin-section {
    background: var(--bg-white);
}

.bulletin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.bulletin-item {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bulletin-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.bulletin-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-green), var(--primary-green-light));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s;
}

.bulletin-item:hover::before {
    opacity: 1;
}

.bulletin-item h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
    line-height: 1.4;
}

.bulletin-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.7;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bulletin-meta strong {
    color: var(--text-body);
    font-weight: 600;
}

.bulletin-desc {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* ---------- Press Release / Articles ---------- */
.press-section {
    background: var(--bg-light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
}

.article-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px) scale(1.01);
}

.article-card .article-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.article-card .article-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover .article-img::after {
    opacity: 1;
}

.article-card .article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-img img {
    transform: scale(1.08);
}

.article-card .article-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card .card-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-orange-dark);
    margin-bottom: 10px;
    padding: 4px 10px;
    background: rgba(240, 138, 36, 0.1);
    border-radius: 999px;
    align-self: flex-start;
}

.article-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.article-card .card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, #0f3d1f 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section .section-display .italic-line,
.cta-section .section-display .bold-line {
    color: #fff;
}

.cta-section .section-display .italic-line {
    opacity: 0.9;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 24px;
}

.cta-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
}

.cta-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.cta-card p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    flex: 1;
    margin-bottom: 24px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary-green);
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    background: var(--accent-orange);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 138, 36, 0.4);
}

/* ---------- Social Feed Section ---------- */
.social-feed-section {
    background: var(--bg-light);
    padding: 120px 0;
}

.social-feed-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: clamp(32px, 4vw, 56px);
    margin-top: 56px;
    align-items: stretch;
    height: 50vh;
}

.social-embed-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.social-embed-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.social-embed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    row-gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(240, 138, 36, 0.04), rgba(20, 83, 45, 0.04));
}

.social-embed-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-embed-header a {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-orange-dark);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--accent-orange);
    border-radius: 999px;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (min-width: 1280px) {
    .social-feed-section .section-inner {
        max-width: 1440px;
        padding: 0 48px;
    }
}

.social-embed-header a:hover {
    background: var(--accent-orange);
    color: #fff;
}

.social-embed-frame {
    width: 100%;
    height: 700px;
    background: var(--bg-light);
    flex: 1;
}

.social-embed-card--youtube .social-embed-frame {
    height: 700px;
}

.social-embed-card--facebook .social-embed-frame {
    height: 800px;
}

.social-embed-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-shell {
    animation: fadeInUp 0.6s ease-out;
}

/* ---------- Mobile & Responsive ---------- */
.mobile-only-card {
    display: none;
}

.desktop-only-card {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1200px) {
    .social-feed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .policy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-shell {
        padding: 48px 0;
    }

    .section-inner {
        padding: 0 20px;
    }
    
    .section-title {
        margin-bottom: 28px;
    }

    .policy-grid,
    .bulletin-grid,
    .articles-grid,
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .site-tagline {
        padding: 40px 20px 32px;
    }
    
    .site-tagline h1::before,
    .site-tagline h1::after {
        display: none;
    }
    
    .cta-card {
        padding: 28px 24px;
    }
    
    .social-embed-frame--youtube {
        height: 320px;
    }
    
    .social-embed-frame--facebook {
        height: 450px;
    }
    
    .social-embed-header {
        padding: 16px 20px;
    }
    
    .social-embed-header h2 {
        font-size: 0.9375rem;
    }

    .mobile-only-card {
        display: flex;
    }

    .desktop-only-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-shell {
        padding: 36px 0;
    }
    
    .section-inner {
        padding: 0 16px;
    }
    
    .policy-card,
    .bulletin-item,
    .article-card .article-body {
        padding: 20px;
    }
    
    .social-embed-header {
        padding: 14px 16px;
    }
    
    .social-embed-header h2 {
        font-size: 0.875rem;
    }
    
    .social-embed-header a {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
    
    .social-embed-frame--youtube {
        height: 260px;
    }
    
    .social-embed-frame--facebook {
        height: 380px;
    }

    .mobile-only-card {
        display: flex;
    }

    .desktop-only-card {
        display: none;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .section-shell {
        padding: 20px 0;
    }
    
    .policy-card,
    .bulletin-item,
    .article-card,
    .social-embed-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .social-feed-section,
    .cta-section {
        display: none;
    }
}
