/* ==========================================================================
   CATHOLIC ASHRAM +2 SCHOOL - UNIFIED STYLESHEET
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-blue: #0d3b66;
    --accent-red: #8b0000;
    --gold-accent: #f4a261;
    --light-bg: #f8f9fa;
    --dark-text: #222222;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

/* TOP MINI BAR */
.top-bar {
    background-color: var(--primary-blue);
    color: #ffffff;
    font-size: 13px;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-links a {
    color: #ffffff;
    transition: color 0.3s;
}

.top-links a:hover {
    color: var(--gold-accent);
}

.btn-admission {
    background-color: var(--gold-accent);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

/* HEADER & BRANDING */
header {
    background: #ffffff;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent-red);
}

.branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.school-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.school-title h1 {
    color: var(--accent-red);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.school-title p {
    font-size: 11px;
    color: #555;
    font-weight: 600;
}

/* NAVIGATION */
nav {
    background-color: var(--accent-red);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 10px 15px;
    width: 100%;
    text-align: right;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    transition: max-height 0.3s ease-in-out;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-links li:hover > a, 
.nav-links li.active > a {
    background-color: var(--primary-blue);
}

/* PAGE HEADER BANNER */
.page-banner {
    background: var(--primary-blue);
    color: #ffffff;
    text-align: center;
    padding: 50px 20px;
}

.page-banner h2 {
    font-size: 32px;
    color: var(--gold-accent);
    margin-bottom: 5px;
}

/* LAYOUT CONTAINER */
.content-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* HERO SECTION (index.html) */
.hero {
    position: relative;
    height: 480px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35)), 
                url('images/cas-bhurkunda-banner.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 0 20px;
    filter: brightness(1.05) contrast(1.02);
}

.hero-content {
    background: transparent;
    padding: 20px;
    backdrop-filter: none;
    box-shadow: none;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 18px;
    color: #ffda79;
    font-weight: 600;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.7);
}

/* HOME DIRECT MESSAGES */
.messages-section {
    padding: 50px 5%;
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: var(--accent-red);
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.message-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ddd;
    object-fit: cover;
    flex-shrink: 0;
}

.message-text h4 {
    color: var(--accent-red);
    margin-bottom: 5px;
}

.message-text p {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.read-more-btn:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

/* HOME FEATURES */
.features-section {
    padding: 40px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--primary-blue);
    color: #ffffff;
    padding: 25px 15px;
    text-align: center;
    border-radius: 6px;
    transition: transform 0.3s, background 0.3s;
    cursor: pointer;
    display: block;
}

.feature-card:nth-child(even) {
    background: var(--accent-red);
}

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

.feature-card i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--gold-accent);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
}

/* NOTICE BOARD */
.notice-news-section {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.notice-board {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.notice-header {
    background-color: var(--primary-blue);
    color: #ffffff;
    padding: 12px 20px;
    font-weight: 600;
}

.notice-list {
    list-style: none;
    padding: 15px 20px;
    height: 220px;
    overflow-y: auto;
}

.notice-item {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.notice-item a {
    color: var(--dark-text);
}

.notice-item a:hover {
    color: var(--accent-red);
}

.notice-date {
    background: var(--gold-accent);
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 11px;
    white-space: nowrap;
}

/* ABOUT US STYLES */
.about-section {
    background: #fff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.about-section h3 {
    color: var(--accent-red);
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid var(--gold-accent);
    display: inline-block;
    padding-bottom: 5px;
}

.manager-message {
    background: #fdfbf7;
    border-left: 5px solid var(--primary-blue);
    padding: 25px;
    border-radius: 4px;
    margin-top: 15px;
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vm-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border-top: 4px solid var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.vm-card h4 {
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* ACADEMICS STYLES */
.academic-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 5px solid var(--accent-red);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.academic-box h3 {
    color: var(--primary-blue);
    font-size: 20px;
    margin-bottom: 12px;
}

.subject-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.subject-table th, 
.subject-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

.subject-table th {
    background: var(--primary-blue);
    color: #fff;
}

/* ADMISSIONS STYLES */
.info-card {
    background: #fff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.info-card h3 {
    color: var(--accent-red);
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid var(--gold-accent);
    display: inline-block;
    padding-bottom: 5px;
}

.step-list {
    list-style: none;
    counter-reset: step-counter;
    margin-top: 15px;
}

.step-list li {
    position: relative;
    padding-left: 45px;
    margin-bottom: 20px;
}

.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.doc-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 10px;
}

.doc-list li {
    margin-bottom: 8px;
}

.contact-box {
    background: #eef4f8;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-blue);
    margin-top: 20px;
}

/* FACULTY STYLES */
.faculty-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.faculty-card h3 {
    color: var(--accent-red);
    margin-bottom: 10px;
    font-size: 20px;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dept-box {
    background: #fdfbf7;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-blue);
}

.dept-box h4 {
    color: var(--primary-blue);
    margin-bottom: 8px;
}

/* STUDENT CORNER STYLES */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.portal-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.portal-card i {
    font-size: 40px;
    color: var(--accent-red);
    margin-bottom: 15px;
}

/* GALLERY STYLES */
.gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    height: 220px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 59, 102, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #ffffff;
    font-size: 28px;
}

/* GALLERY LIGHTBOX */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold-accent);
}

/* CONTACT PAGE STYLES */
.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-info-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-info-item i {
    font-size: 22px;
    color: var(--accent-red);
    margin-top: 3px;
}

.contact-info-item h4 {
    color: var(--primary-blue);
    font-size: 16px;
    margin-bottom: 3px;
}

.form-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.btn-submit {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:hover {
    background: var(--primary-blue);
}

/* MODAL POPUP (index.html) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 650px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background-color: var(--primary-blue);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--gold-accent);
}

.modal-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close-btn:hover {
    color: var(--gold-accent);
}

.modal-body {
    padding: 25px;
    max-height: 75vh;
    overflow-y: auto;
    font-size: 14px;
    color: var(--dark-text);
    line-height: 1.7;
}

.modal-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-author img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-author div h4 {
    color: var(--accent-red);
    font-size: 16px;
}

.modal-author div p {
    font-size: 12px;
    color: #666;
}

/* FOOTER */
footer {
    background-color: var(--primary-blue);
    color: #ffffff;
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    font-size: 13px;
}

footer.footer-home {
    text-align: left;
    padding: 40px 5% 10px;
}

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

.footer-col h4 {
    color: var(--gold-accent);
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    color: #aaa;
}

.developer-link {
    color: var(--gold-accent);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.developer-link:hover {
    color: #ffffff;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 28px;
    }
    .hero-content p {
        font-size: 15px;
    }
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar, header {
        text-align: center;
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }

    .branding {
        flex-direction: column;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        display: none;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: left;
    }

    .hero {
        height: 380px;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .notice-news-section {
        grid-template-columns: 1fr;
    }

    .message-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-item {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .top-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .school-title h1 {
        font-size: 18px;
    }

    .school-title p {
        font-size: 10px;
    }
}