/* assets/css/style.css */

:root {
    --primary-color: #f05a28; /* Brand Orange */
    --primary-hover: #d94b1a;
    --bg-light: #fef8f4;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --footer-bg: #0f172a;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 4px 6px -1px rgba(240, 90, 40, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(240, 90, 40, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; }

a { text-decoration: none; color: inherit; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; }
.brand svg { color: var(--primary-color); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary-color); }

.btn {
    padding: 0.625rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-color), #f97316); color: white; }
.btn-primary:hover { box-shadow: 0 10px 15px -3px rgba(240, 90, 40, 0.3); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid white; color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-dark { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline-dark:hover { background: var(--primary-color); color: white; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e64611 100%);
    color: white;
    padding: 6rem 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { z-index: 1; }
.hero-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-desc { font-size: 1.125rem; margin-bottom: 2.5rem; opacity: 0.9; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; }
.hero-image-wrapper { position: relative; display: flex; justify-content: flex-end; z-index: 1; }
.hero-image {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    object-fit: cover;
    border: 15px solid rgba(255,255,255,0.2);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* Base Container */
.container { max-width: 1200px; margin: 0 auto; padding: 5rem 5%; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-muted); }

/* Directory Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.dir-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}
.dir-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary-color); }
.dir-icon {
    width: 48px; height: 48px;
    margin: 0 auto 1rem auto;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.dir-title { font-weight: 600; font-size: 1.125rem; }
.dir-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Filter Bar */
.filter-bar {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    display: flex;
    background: white;
    padding: 0.5rem;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
}
.filter-bar input {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    outline: none;
    font-size: 1rem;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}
.stat-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.stat-item .icon { width: 56px; height: 56px; border-radius: 50%; background: #fff3f0; color: var(--primary-color); display: flex; align-items: center; justify-content: center; }

/* Products & Donate Grid */
.mixed-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}
.product-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1rem;
    gap: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    align-items: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}
.product-card:hover { transform: translateX(5px); }
.product-card img { width: 100px; height: 100px; border-radius: 12px; object-fit: cover; }
.product-info h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.product-info p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.5rem; }
.product-info a { color: var(--primary-color); font-weight: 600; font-size: 0.875rem; }
.price-tag { font-weight: 700; color: var(--text-dark); }

.donate-panel {
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: white;
    box-shadow: var(--shadow-md);
}
.donate-top { padding: 1.5rem; text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.2); }
.donate-body { padding: 2rem; background: var(--bg-white); color: var(--text-dark); text-align: center; }
.qr-code { width: 200px; height: 200px; margin: 0 auto 1.5rem auto; background: #0f766e; padding: 1rem; border-radius: 12px; /* Placeholder styling */ display:flex; align-items:center; justify-content:center;}
.qr-code img { width: 100%; height: 100%; object-fit: contain; background: white; padding: 8px; border-radius: 8px; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.news-card { background: var(--bg-white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s; cursor: pointer; border: 1px solid var(--border-color); }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.news-img { width: 100%; height: 200px; object-fit: cover; }
.news-content { padding: 1.5rem; }
.news-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.news-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.news-excerpt { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.news-readmore { font-size: 0.875rem; color: var(--primary-color); font-weight: 600; }

/* Footer */
.footer { background: var(--footer-bg); color: white; padding: 4rem 5% 2rem 5%; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 3rem; }
.footer-title { color: white; font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; }
.footer-text { color: #94a3b8; font-size: 0.875rem; margin-bottom: 1.5rem; max-width: 300px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; transition: color 0.2s; font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary-color); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; color: #64748b; font-size: 0.875rem; }

/* Result List for Directory Search */
.search-results {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-top: 1.5rem;
    display: none; /* toggled via JS */
}
.result-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-bottom: 1px solid var(--border-color);
}
.result-item:last-child { border-bottom: none; }
.result-info h4 { margin-bottom: 0.25rem;}
.result-info p { font-size: 0.875rem; color: var(--text-muted); }

/* Forms */
.public-form { background: white; padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-dark); font-size: 0.875rem; }
.form-control { width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 1rem; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary-color); }

/* Responsive Media Queries */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 1rem; padding: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    
    .hero { grid-template-columns: 1fr; padding: 3rem 5%; text-align: center; gap: 2rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-desc { margin: 0 auto 2rem auto; }
    .hero-actions { justify-content: center; flex-wrap: wrap; }
    .hero-image-wrapper { justify-content: center; }
    .hero-image { width: 300px; height: 300px; border-width: 10px; }
    
    .stats-row { grid-template-columns: 1fr; gap: 1rem; margin: 2rem 0; }
    .mixed-grid { grid-template-columns: 1fr; gap: 2rem; }
    .news-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .footer-text { margin: 0 auto 1.5rem auto; }
    .footer-links { text-align: center; }
    .footer-bottom { flex-direction: column; align-items: center; gap: 1rem; }
    
    .map-section { grid-template-columns: 1fr; }
    
    .public-form { padding: 1.5rem; }
    
    /* Inline grid overrides for PHP pages */
    div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; gap: 1rem !important; }
}
