/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-color: #E21B24;
    --dark-color: #222;
    --light-color: #f4f4f4;
    --white: #ffffff;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    background-color: #fff;
}

.container {
    max-width: 1650px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. HEADER & NAVIGATION (DESKTOP)
   ========================================================================== */

.top-bar {
    background-color: #d31411; /* CSI Red */
    color: #ffffff;
    width: 100%;
    padding: 8px 0;
    font-family: 'Poppins', sans-serif;
}

.top-bar-container {
    max-width: 1790px; /* Pantay sa grid mo */
    margin: 0 auto;
    padding: 0 5%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-bar-item {
    font-size: 13px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* 3. Main Header (Logo & Nav) */
header {
    background: #ffffff;
    height: 80px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1790px;
    width: 100%;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}


/* --- MOBILE VIEW FIX --- */
@media (max-width: 768px) {
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-container {
        flex-direction: column; /* I-stack ang items para hindi mag-overlap */
        gap: 8px;
        padding: 0 10px;
    }

    .top-bar-left {
        flex-direction: column; /* Stack phone and email */
        gap: 5px;
    }

    .top-bar-item {
        font-size: 12px; /* Bahagyang liitan sa mobile */
    }
    
    /* Itago ang email sa sobrang liit na screen kung kailangan */
    /* .top-bar-left .top-bar-item:nth-child(2) { display: none; } */
}



/* Nav Desktop */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 0 15px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: var(--nav-height);
    display: block;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

/* Sub-menu Desktop (Hover) */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none; /* Tago muna */
    flex-direction: column;
}

/* Desktop Hover logic */
@media (min-width: 769px) {
    .has-dropdown:hover .sub-menu {
        display: flex;
    }
    .sub-menu li a {
        line-height: 45px;
        border-bottom: 1px solid #f0f0f0;
    }
}

.menu-toggle {
    display: none;
}



/* ==========================================================================
   MOBILE NAVIGATION - NO GRAY OVERLAY & RIGHT ALIGNED
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Side Panel - Ngayon ay nasa KANAN na */
    nav#main-nav {
        position: fixed !important;
        top: 70px; /* Sukat ng header height mo */
        right: -100%; /* Nakatago sa kanang labas ng screen */
        left: auto;   /* Siguraduhing hindi naka-set sa left */
        width: 280px;
        height: calc(100vh - 70px); 
        background: #ffffff !important;
        z-index: 999; 
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0,0,0,0.05);
        display: block !important;
        overflow-y: auto;
        
    }
.has-dropdown {
        position: relative;
    }
    /* Pag lumabas ang menu, papasok siya galing kanan */
    nav#main-nav.active {
        right: 0 !important;
    }

    /* Overlay - Ginawang transparent para clickable ang paligid */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: transparent; 
        z-index: 998;
        display: none;
    }

    .menu-overlay.active {
        display: block;
    }

    /* Alignment ng text at arrow */
    nav ul li a {
        display: flex !important;
        justify-content: space-between; 
        align-items: center;
        padding: 18px 25px;
        text-align: left;
    }
}

    /* Ilipat ang dropdown list sa kanan */
    .sub-menu {
        position: absolute;
        top: 100%;       /* Lalabas sa ilalim ng Products text */
        right: 0;        /* Ito ang maglilipat sa kanya sa gawing kanan */
        left: auto;      /* I-reset ang left alignment */
        min-width: 200px;
        background: #ffffff;
        box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
        z-index: 1000;
        display: none;    /* Tago muna, lalabas lang pag clinick */
    }

    .sub-menu.open {
        display: block !important;
    }

    /* Alignment ng bawat item sa loob */
    .sub-menu li a {
        text-align: right; /* Kung gusto mo pati text ay nasa kanan */
        padding: 12px 20px;
        display: block;
    }

    /* Arrow Icon Rotation */
    .active-drop i {
        transform: rotate(180deg);
        transition: 0.3s;
    }


/* Header fix para hindi lumubog ang logo */
header {
    position: sticky;
    top: 0;
    z-index: 1000 !important;
    background: #ffffff;
    height: 70px;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&family=Oswald:wght@700&display=swap');

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}
/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    nav { display: none; width: 100%; }
    nav.active { display: block; position: absolute; top: 100%; left: 0; background: var(--white); }
    nav ul { flex-direction: column; }
    .hero h2 { font-size: 2.2rem; }
    .top-bar .container { flex-direction: column; text-align: center; gap: 5px; }
}

/* Overlay para magmukhang modern at mabasa ang text */
.hero-overlay {
    width: 100%;
    height: 100%;
    /* Gradient: Nagpapadilim sa kaliwa para lumitaw ang puting text */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: center;
}

.hero-container {
    padding-left: 10%;
    color: #ffffff;
}

.hero-container h1 {
    font-size: 4rem;
    font-weight: 800;
    margin: 0;
}

.hero-container p {
    font-size: 1.2rem;
    margin-top: 5px;
    opacity: 0.9;
}
.modern-hero {
    width: 100%;
    height: 600px; /* Taas ng banner */
    
    /* BACKGROUND IMAGE CODE */

    background-size: cover;      /* Pinupuno ang buong space ng banner */
    background-position: center; /* Pinapagitna ang focus ng litrato */
    background-repeat: no-repeat;
    background-attachment: scroll; /* Gawing 'fixed' kung gusto mo ng parallax effect */
    
    position: relative;
    display: block;
}
/* --- MOBILE VIEW PARA SA HERO --- */
@media screen and (max-width: 768px) {
    .modern-hero {
        height: 400px; /* Mas maikli na taas para sa mobile */
        /* Optional: background-attachment: scroll; - mas okay ito sa mobile kaysa fixed */
    }

    .hero-overlay {
        /* Gradient: Sa mobile, mas maganda kung pantay ang dilim (to bottom o full overlay) */
        background: rgba(0, 0, 0, 0.5); 
        justify-content: center; /* I-center ang content horizontal */
        text-align: center;      /* I-center ang text alignment */
    }

    .hero-container {
        padding-left: 0;         /* Alisin ang 10% padding */
        width: 90%;              /* Bigyan ng saktong lapad */
        margin: 0 auto;          /* I-center ang container */
    }

    .hero-container h1 {
        font-size: 2.2rem;       /* Paliitin ang text para kumasya sa isang screen */
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .hero-container p {
        font-size: 1rem;         /* Mas readable na sukat sa mobile */
        padding: 0 10px;
    }
}

/* Para sa mas liliit pang screens (Small Phones) */
@media screen and (max-width: 480px) {
    .modern-hero {
        height: 350px;
    }

    .hero-container h1 {
        font-size: 1.8rem;
    }
}
/* --- Global Styles --- */
body { 
    background-color: white; 
    color: rgb(0, 0, 0); 
    font-family: 'Arial', sans-serif; 
    margin: 0;
    padding: 0;
}

/* =============================================================
   NEWS SECTION - EXTRA COMPACT THUMBNAIL STYLE
   ============================================================= */

/* 1. Main Container */
.news-section { 
    padding: 40px 20px; 
    max-width: 1400px; 
    margin: auto; 
    font-family: 'Poppins', sans-serif;
}

.news-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.section-title { 
    font-size: 24px;
    font-weight: 900; 
    letter-spacing: 1px; 
    text-transform: uppercase;
    color: #111;
    border-left: 4px solid #a70707;
    padding-left: 12px;
}

/* 2. Carousel Wrapper */
.carousel-container { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.news-wrapper {
    display: flex;
    gap: 15px; /* Siksik na distansya */
    overflow-x: auto; 
    scroll-behavior: smooth;
    padding: 15px 5px;
    scrollbar-width: none; 
}

.news-wrapper::-webkit-scrollbar {
    display: none; 
}

/* 3. News Card - Inayos para kumasya ang apat */
.news-card {
    /* Formula para sa 4 na cards: (100% - total gaps) / 4 */
    flex: 0 0 calc((100% - 45px) / 4); 
    min-width: 180px; /* Mas maliit na base width */
    background-color: #ffffff; 
    border-radius: 8px;
    padding:5px; /* Mas compact na padding */
    border: 1px solid #eee; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); 
    
    /* Ginawang flex ang card */
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1); 
    border-color: #a70707; 
}

/* 4. Image Container - Inadjust ang height para sa maliit na card */
.img-container { 
    position: relative; 
    overflow: hidden; 
    border-radius: 5px; 
    display: flex;
    height: 210px; /* Pinaliit para hindi masyadong mahaba tignan */
}

.img-container img {
    width: 100%;
    height: 100%; s
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.news-card:hover .img-container img { 
    transform: scale(1.1); 
}

.date-tag {
    position: absolute;
    top: 0; 
    left: 0;
    background: #a70707; 
    color: white;
    padding: 3px 6px;
    font-size: 12px; /* Mas maliit na font */
    font-weight: bold;
    text-align: center;
    z-index: 2;
    border-bottom-right-radius: 5px;
}

/* 5. News Content - Compact Text Layout */
.news-content {
    display: flex;
    flex-direction: column;
    padding: 2px 2px;
}

.category { 
    color: #a70707; 
    font-size: 8px; 
    font-weight: 800; 
    margin-bottom: -20px; 
    text-transform: uppercase;
}

.news-content h3 { 
    font-size: 13px; /* Bahagyang pinaliit */
    margin: 10px 0; 
    font-weight: 700; 
    color: #111;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit hanggang 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px; /* Fixed height para pantay-pantay */
}

.summary { 
    color: #666; 
    font-size: 10.1px; 
    line-height: 1; 
    height: 30px; /* Hanggang 2 lines lang para siksik */
    overflow: hidden; 
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.show-more { 
    color: #2e2e2e; 
    text-decoration: none; 
    font-size: 10px; 
    display: inline-block; 
    margin-top: 5px; 
    font-weight: bold;
    padding: 2px 0;
    transition: transform 0.3s;
}

/* 6. Scroll Buttons */
.btn-scroll {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    border: 1px solid #eee;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    font-size: 14px;
}

.btn-scroll:hover { 
    background: #a70707; 
    color: white;
    border-color: #a70707;
}

.left { left: -15px; }
.right { right: -15px; }

/* --- MOBILE VIEW ADJUSTMENTS --- */
@media (max-width: 768px) {
    
    .news-wrapper {
        gap: 12px;
        padding: 10px 15px; /* Dagdag padding sa gilid para sa mobile */
        scroll-snap-type: x mandatory; /* Para "mag-magnet" ang card pag-swipe */
    }

   
    .news-card {
        flex: 0 0 75%; /* Ibig sabihin 75% ng screen ang lapad ng isang card */
        min-width: 250px;
        scroll-snap-align: center; /* Magnet effect sa gitna */
        aspect-ratio: auto; /* Hayaan ang content ang mag-dikta ng haba */
    }

  
    .img-container {
        height: 180px;
    }

 
    .news-content h3 {
        font-size: 14px;
        height: auto; /* Hayaan mag-adjust sa mobile */
        max-height: 40px;
    }

    .summary {
        font-size: 12px;
        line-height: 1.4;
    }

   
    /* Karaniwan, daliri na ang gamit sa swipe kaya hindi na kailangan ang arrows */
    .btn-scroll {
        display: none;
    }
}

/* Extra Small Devices (Phones) */
@media (max-width: 480px) {
    .news-card {
        flex: 0 0 85%; /* Mas malapad ng konti para mas klaro */
    }
    
    .img-container {
        height: 160px;
    }
}
/*cartalks */

/* Container adjustment */
/* --- Modern News Container --- */
.modern-news-container {
    padding: 60px 20px;
    background-color: #fff; 
    display: flex;
    justify-content: center;
}

.news-feed-overlay {
    display: flex;
    gap: 25px;
    max-width: 1350px;
    width: 100%;
}

/* --- Card Structure --- */
.overlay-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

/* 1. Image Section - LAKIHAN NG KONTI (Mula 200px -> 280px) */
.card-bg-img {
    position: relative;
    width: 100%;
    height: 280px; 
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    z-index: 1;
}

/* 2. Content Styling (Bottom) */
.overlay-content {
    position: relative;
    z-index: 3;
    padding: 20px; /* Binawasan ng konti ang padding */
    color: #111;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff;
    flex-grow: 1;
}

.overlay-subtitle {
    font-size: 9px; /* Pinaliit din ang subtitle */
    color: #e10600;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.overlay-title {
    font-size: 20px; /* Mas compact na title */
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #000;
    line-height: 1.2;
}

/* 3. Description - LIITAN (Mula 13px -> 11px) */
.overlay-description {
    font-size: 11px; 
    color: #777; 
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Modern Button (Pill Shape) */
.btn-discover {
    display: inline-flex;
    align-items: center;
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 10px; /* Pinaliit din ang text ng button */
    width: fit-content;
    border-radius: 50px;
    transition: all 0.3s;
    margin-top: auto;
}

.plus-icon {
    margin-right: 6px;
    font-size: 12px;
    transition: transform 0.3s;
}

/* --- HOVER EFFECTS --- */

.overlay-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.overlay-card:hover .card-bg-img {
    transform: scale(1.08);
}

.overlay-card:hover .btn-discover {
    background: #e10600;
}

.overlay-card:hover .plus-icon {
    transform: rotate(90deg);
}

/* --- Mobile View --- */
@media screen and (max-width: 768px) {
    .news-feed-overlay {
        flex-direction: column;
        gap: 20px;
    }
    .card-bg-img {
        height: 220px; /* Adjust sa mobile para hindi sobrang haba */
    }
}
