/* CSS Variables for Premium Design */
:root {
    --primary: #0077c2; /* Vibrant Water Blue */
    --hover-primary: #005f9e;
    --background: #f4f7f9;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-secondary: #7f8c8d;
    --accent: #27ae60;
    --nav-height: 70px;
    --transition-speed: 0.3s;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Page Transition Effect */
#content {
    opacity: 1;
    transition: opacity var(--transition-speed) ease-in-out;
}

#content.fade-out {
    opacity: 0;
}

/* Header & Nav */
header {
    background-color: var(--card-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 10px;
    transition: all 0.3s linear;
}

nav {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color var(--transition-speed);
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Layout */
main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

/* Components */
.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

/* Store Cards */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.store-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.store-image {
    width: 100%;
    height: 180px;
    background: #e0e6ed;
    object-fit: cover;
}

.store-info {
    padding: 20px;
}

.store-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.type-pump { background: #e3f2fd; color: #1976d2; }
.type-shop { background: #e8f5e9; color: #2e7d32; }

.store-address {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.store-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-active::before {
    content: "●";
    color: #27ae60;
    margin-right: 5px;
}

/* News Section */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.news-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin: 10px 0;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 20px 20px;
    margin-top: 80px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Purification Steps (9 Steps) */
.purification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.purification-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    gap: 20px;
    align-items: center;
    border-left: 5px solid var(--primary);
}

.step-num {
    background: var(--primary);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Specific store info in cards */
.store-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.store-feature-tag {
    background: #f0f4f8;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-main);
}

.price-list {
    font-weight: 700;
    color: var(--accent);
    margin: 10px 0;
}

.store-phone {
    display: block;
    margin-top: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.store-hours {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

/* Hero Section */
.hero {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0,119,194,0.05) 0%, rgba(39,174,96,0.05) 100%);
    border-radius: 30px;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title span {
    font-size: 2.5rem;
    display: block;
    color: var(--secondary);
    -webkit-text-fill-color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,119,194,0.3); }

.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(39,174,96,0.3); }

/* News Mini Cards (Homepage) */
.news-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card-mini {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.news-card-mini img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-mini-info { padding: 20px; }

.news-mini-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.news-card-mini h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.news-card-mini p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Full News Page */
.news-grid {
    display: grid;
    gap: 40px;
    max-width: 900px;
    margin: 40px auto;
}

.news-full-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.news-full-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.news-full-body { padding: 40px; }

.news-date { color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.news-content { line-height: 1.6; color: var(--text-main); }

/* Portal Layout */
.portal-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.portal-main-grid {
    display: grid;
    gap: 40px;
}

.portal-news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.portal-news-card img {
    width: 100%;
    /* No max-height as requested */
    object-fit: contain;
    background: #f9f9f9;
}

.portal-news-body { padding: 30px; }
.portal-news-body h2 { margin: 10px 0; color: var(--primary); }
.portal-news-body h2 a { text-decoration: none; color: inherit; }
.portal-news-body p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.read-more { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 0.9rem; }

.portal-sidebar {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.portal-sidebar h3 { margin-bottom: 25px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
.sidebar-list { display: grid; gap: 20px; max-height: 80vh; overflow-y: auto; padding-right: 10px; }
.sidebar-item { border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 15px; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-date { font-size: 0.8rem; color: var(--text-secondary); }
.sidebar-item h4 { margin: 5px 0; line-height: 1.3; }
.sidebar-item h4 a { text-decoration: none; color: var(--text-main); font-size: 0.95rem; }
.sidebar-item h4 a:hover { color: var(--primary); }

/* Single News Article Page */
.news-single {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

.news-single-title { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; line-height: 1.2; }
.news-single-date { color: var(--text-secondary); margin-bottom: 30px; font-weight: 600; }
.news-single-img { width: 100%; border-radius: 15px; margin-bottom: 40px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); object-fit: contain; }
.news-single-content { line-height: 1.8; font-size: 1.1rem; color: var(--text-main); margin-bottom: 50px; }
.news-single-content p { margin-bottom: 20px; }
.news-single-content b, .news-single-content strong { color: var(--primary); }

/* Footer navigation on single news */
.news-single-footer { margin-top: 60px; }
.news-single-footer hr { border: 0; border-top: 1px solid #eee; margin-bottom: 30px; }
.news-single-footer h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-main); }
.rec-news-links { list-style: none; padding: 0; margin-bottom: 40px; }
.rec-news-links li { margin-bottom: 12px; }
.rec-news-links a { color: var(--primary); text-decoration: none; font-weight: 500; font-size: 1.05rem; transition: color 0.3s; }
.rec-news-links a:hover { color: var(--accent); }

.news-actions-bar { display: flex; gap: 15px; flex-wrap: wrap; }
.news-actions-bar .btn { flex: 1; min-width: 180px; text-align: center; justify-content: center; }

/* Mobile Portal Responsive */
@media (max-width: 900px) {
    .portal-layout { grid-template-columns: 1fr; }
    .portal-sidebar { position: static; margin-top: 40px; }
    .news-single-title { font-size: 2rem; }
    .news-single { padding: 25px; }
}

/* Store Grid Layout */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.store-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.store-image {
    height: 220px;
    width: 100%;
}

.store-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.store-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    background: #e1f5fe;
    color: #0288d1;
    width: fit-content;
}

.store-address {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.price-list {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.store-status {
    margin-bottom: 10px;
    font-weight: 600;
}

.status-open { color: #2ecc71; }
.status-closed { color: #e74c3c; }

.store-hours {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .store-grid { grid-template-columns: 1fr; }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: left 0.4s ease;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        z-index: 1000;
        gap: 40px;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.4rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* Burger Animation */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}
