body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    background-image: url('backg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;  
}

/*start of navbar main header*/
.main-header {
    background-color: white; 
    padding: 10px 0px; 
    display: flex;
    justify-content: center; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    position: relative;
    z-index: 1000;
    box-sizing: border-box; 
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px; 
}

.main-nav { 
    margin-left: auto; 
    margin-right: 30px; 
}

.header-school-name {
    color: #1b4d3e;
    font-family: 'Georgia', serif;
    font-size: 22px;
    font-weight: bold;
    margin-left: 10px;
    line-height: 1.2;
    word-break: break-word;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-cct-logo {
    height: 50px; 
    margin-right: 15px; 
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: #1b4d3e;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 0;
    transition: color 0.3s ease;
    background-color: transparent; 
    border-radius: 0; 
    font-size: 18px;
    font-family: 'Transcity', sans-serif;
}

.main-nav ul li a:hover {
    color: #f1c40f; 
    text-decoration: none;
}
/*End of navbar*/

/* hamburger na icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 10px;
    background: none;
    border: none;
    padding: 0;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #1b4d3e;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* dropdown na design */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1002;
    border-top: 3px solid #1b4d3e;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #1b4d3e !important;
    padding: 12px 16px !important;
    text-decoration: none;
    display: block;
    font-size: 16px !important;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: #f1c40f !important;
}

/* design ng dropdown sa mobile */
.dropdown:hover .dropdown-content {
    display: block;
}

.bottom-bar {
    background-color: #1b4d3e;
    width: 100%;
    min-height: 200px; 
    text-align: center;
    padding: 50px 20px 20px 20px;
    box-sizing: border-box;
    box-shadow: 0px 1px 15px rgba(29, 59, 22, 0.664);
}

.bottom-bar h1 {
    font-size: 50px;
    font-weight: bold; 
    margin: 0;         
    text-align: center; 
    color: white;
    font-family: "Montserrat", ui-sans-serif, system-ui,
            -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
            Helvetica Neue, Arial, Noto Sans, sans-serif,
            Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,
            Noto Color Emoji; 
}

.bottom-bar p {
    font-size: 16px; 
    margin: 10px 0 0 0; 
    text-align: center; 
    color: white;
}

.latest-news-container {
    display: flex;
    flex-wrap: wrap;  
    justify-content: flex-start; 
    gap: 20px;  
    padding: 30px;
}

.latest-news {
    display: flex;              
    flex-direction: column;    
    justify-content: space-between; 
    background-color: #ffffff;
    width: calc((100% / 3) - 13.33px);
    min-height: 350px;    
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 30px;
    box-shadow: 0px 1px 4px rgba(29, 59, 22, 0.664);
    border-radius: 8px;
}

.latest-news p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    color: hsl(0, 0%, 30%);
}

.card-photo1 {
    width: 100%;          
    max-width: 200px;      
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 15px auto; 
}

.button-readmore {
    display: inline-block;
    padding: 8px 16px;
    background-color: #11502b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 15px;
    align-self: center; 
    box-shadow: 0 1px 2px rgb(117, 116, 58);
}

.button-readmore:hover {
    background-color: #27663f;
    transform: scale(1.01);
    box-shadow: 0 1px 2px rgb(117, 116, 58);
}

.news-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;  
    line-clamp: 2;           
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;       
    transition: all 0.3s ease;
}

.news-text.expanded {
    -webkit-line-clamp: unset; 
    line-clamp: unset;
    overflow: visible;
}

.loadmore-container {
    display: flex;
    justify-content: center;
}

.button-loadmore {
    display: inline-block;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 600;
    background-color: #f1c40f;
    color: whitesmoke;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px #161616;
    margin: 20px 0 50px 0;
    transition: 0.1s ease;
}

.button-loadmore:hover {
    background-color: #b6b434;
    transform: scale(1.04);
    box-shadow: 0 1px 2px rgb(117, 116, 58);
}

.top-header {
    background-color: #1b4d3e;
    color: white;
    padding: 8px 0;
    width: 100%;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    box-sizing: border-box;
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.top-header-left, .top-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 15px;
}

.top-header-item {
    display: flex; 
    white-space: nowrap;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 13px;
    text-decoration: none;
}

.top-header-item i {
    color: #f1c40f; 
}

.main-footer-bottom {
    background-color: #1b4d3e;
    color: white;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-column h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #f1c40f;
}

.footer-column p {
    margin: 5px 0;
    font-size: 0.9em;
}

.footer-logo {
    height: 60px;
}

.footer-powered-by {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8em;
}



@media (max-width: 992px) {

    .nav-separator {
        display: none;
    }

  .signin-btn-nav {
    display: block;
    text-align: center;
    margin: 10px 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
  }
    .footer-main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-branding {
        justify-content: flex-start;
    }

    .footer-copyright {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }
    body {
        background-attachment: scroll;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        z-index: 999;
        margin: 0;
    }

    .main-nav.nav-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .main-nav ul li {
        margin: 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav ul li a {
        display: block;
        padding: 14px 20px;
        font-size: 16px;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 4px solid #1b4d3e;
        margin-left: 20px;
        min-width: unset;
        display: none;
    }

    .dropdown.dropdown-open .dropdown-content {
        display: block;
    }

    .dropdown > a::after {
        content: ' ▾';
        font-size: 12px;
        opacity: 0.7;
    }

    .dropdown.dropdown-open > a::after {
        content: ' ▴';
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .latest-news {
        width: calc((100% / 2) - 10px);
    }

    .bottom-bar h1 {
        font-size: 32px;
    }

    .bottom-bar p {
        font-size: 12px;
    }
    .header-content {
    justify-content: space-between;
}
}

/*for mobile responsiveness*/
@media (max-width: 576px) {
    .header-cct-logo,
    .header-lgu-logo {
        height: 40px;
        margin-right: 10px;
    }

    .header-school-name {
        font-size: 16px;
    }
    

    .latest-news {
        width: 100%;
        padding: 20px 15px;
    }

    .top-header-content {
        flex-direction: column; 
        align-items: center;
        gap: 10px;
    }

    .top-header-left, .top-header-right {
        width: 100%;           
        justify-content: center;
        padding-right: 0;
    }

    .top-header-item {
        white-space: normal;
        word-break: break-word;
        text-align: center;
    }

    .bottom-bar h1 {
        font-size: 24px;
    }

    .bottom-bar p {
        font-size: 10px;
    }

    .bottom-bar {
        padding: 30px 10px 15px 10px;
    }
    .map-container {
        height: 250px;
    }

        .system-footer {
        padding: 40px 20px 20px;
        text-align: center;
    }

    .footer-main-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-branding {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .footer-branding img {
        height: 40px;
    }

    .footer-links h4 {
        margin-top: 15px;
    }

    .footer-copyright {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.contact-form, .contact-info {
    background-color: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.contact-form h2, .contact-info h2 {
    color: #1b4d3e;
    margin-bottom: 25px;
    font-size: 24px;
    border-bottom: 2px solid #f1c40f;
    display: inline-block;
    padding-bottom: 5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #11502b;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #1b4d3e;
    box-shadow: 0 0 5px rgba(27,77,62,0.3);
    outline: none;
}

.button-submit {
    background-color: #1b4d3e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(27,77,62,0.2);
}

.button-submit:hover {
    background-color: #27663f;
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(27,77,62,0.25);
}

.map-container iframe {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    margin-top: 20px;
}

.contact-form .button-readmore {
    width: 100%;
    text-align: center;
}

/* --- FOOTER --- */
.system-footer {
    background: linear-gradient(135deg, #1b4d3e 0%, #2e7d32 100%);
    color: white;
    padding: 60px 5% 20px;
    margin-top: auto;
}

.footer-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-branding { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.footer-branding img { height: 45px; }
.footer-links h4 { border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; color: #ffffff; }
.footer-links a, .footer-links p { color: white; text-decoration: none; font-size: 14px; margin-bottom: 10px; display: block; opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.footer-copyright {
    border-top: 1px dashed rgba(255,255,255,0.3);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.wincel-brand-small {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.wincel-brand-small:hover {
    opacity: 1;
}

.wincel-mini-logo-small {
    height: 20px;
}

.button-logout {
    padding: 8px 15px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}
.button-logout:hover {
    background-color: #c9302c;
}

        .signin-btn-nav {
            background-color: transparent !important;
            color: #1b4d3e !important;
            padding: 8px 25px !important;
            border-radius: 50px !important;
            font-weight: bold !important;
            transition: 0.3s !important;
            border: 2px solid #1b4d3e !important;
            flex-shrink: 0;                    /* prevent button from squishing */
            white-space: nowrap;   
        }

        .signin-btn-nav:hover {
            background-color: #f1c40f !important;
            color: #1b4d3e !important;
            transform: translateY(-2px);
        }
.nav-separator {
    width: 1px;
    height: 25px;
    background-color: #ccc;
    align-self: center;
}