/* website.css - Shared Styles for HalAcad Public Website */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --green-dark: #0f3b2a;
    --green-primary: #1a5c3e;
    --green-medium: #2d7a4e;
    --green-light: #4caf50;
    --green-bg: #f0f7f2;
    --gold: #d4af37;
    --gold-hover: #b8860b;
    --gold-light: #f3d36a;
    --surface: #ffffff;
    --text-main: #2d3748;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px -8px rgba(0,0,0,0.12);
    --radius: 16px;
    --transition: all 0.3s ease;
}

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

body {
    background: var(--green-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 72px; /* Offset for fixed header */
}

/* ==========================================
   HEADER & NAVIGATION
========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 59, 42, 0.96);
    backdrop-filter: blur(12px);
    padding: 0.9rem 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.logo span {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo span strong {
    color: var(--gold);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--gold);
}

.login-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff !important;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.login-btn::after {
    display: none !important;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    color: var(--gold);
    cursor: pointer;
    line-height: 1;
}

/* ==========================================
   HERO SECTIONS
========================================== */
.hero {
    min-height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 50%, var(--green-medium) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    animation: rotateGlow 30s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg) }
    to { transform: rotate(360deg) }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    mix-blend-mode: overlay;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
    max-width: 850px;
    animation: fadeUp 1s ease-out;
}

.hero-content h1 {
    font-size: 3.8rem;
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    animation: fadeUp 1s ease-out 0.3s backwards;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
}

.hero-stat .label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Page Hero for Inner Pages */
.page-hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 100%);
    padding: 5rem 6%;
    text-align: center;
    color: white;
    position: relative;
    border-bottom: 3px solid var(--gold);
    margin-bottom: 0px;
}

.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.page-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   LAYOUT CONTAINERS & HELPERS
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 6%;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    color: var(--green-primary);
    font-size: 2.2rem;
    font-weight: 700;
    display: inline-block;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--green-light));
    border-radius: 4px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ==========================================
   ABOUT PAGE SPECIFIC
========================================== */
.about-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-image .badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--green-dark);
    color: var(--gold);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.about-text p {
    margin-bottom: 1.2rem;
}

/* Headteacher layout in about.jsp */
.headteacher-section {
    background: var(--surface);
    padding: 5rem 6%;
}

.headteacher-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3.5rem;
    align-items: center;
}

.headteacher-img-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--gold);
}

.headteacher-img-wrapper img {
    width: 100%;
    display: block;
    transition: var(--transition);
}

.headteacher-info h3 {
    color: var(--green-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.headteacher-info h4 {
    color: var(--gold-hover);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.headteacher-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Core Values styling */
.values-section {
    padding: 5rem 6%;
    background: var(--green-bg);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    background: var(--surface);
    padding: 2.2rem 1.8rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.3);
}

.value-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.value-card h4 {
    color: var(--green-primary);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.value-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================
   NOTICE BOARD & EVENT CARDS
========================================== */
.notice-card {
    background: linear-gradient(135deg, var(--green-dark), var(--green-primary));
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    box-shadow: 0 20px 40px rgba(15, 59, 42, 0.2);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.notice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--gold);
}

.notice-card h3 {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    display: flex;
    gap: 12px;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-icon {
    color: var(--gold);
    font-size: 1.2rem;
}

/* Events grid */
.events-section {
    background: var(--surface);
    padding: 5rem 6%;
}

.event-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.event-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--gold);
}

.event-info {
    padding: 1.5rem;
    text-align: center;
}

.event-info h3 {
    color: var(--green-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

/* ==========================================
   RESULTS & ADMISSION STYLING (checkresult.jsp / login.jsp)
========================================== */
.admission-section {
    padding: 5rem 6%;
}

.admission-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    border: 1px solid rgba(0,0,0,0.02);
}

.admission-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admission-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-form form {
    display: flex;
    flex-direction: column;
}

.result-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-form label i {
    color: var(--gold-hover);
}

.result-form input,
.result-form select {
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--green-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    width: 100%;
    outline: none;
}

.result-form input:focus,
.result-form select:focus {
    background: #fff;
    border-color: var(--green-medium);
    box-shadow: 0 0 0 4px rgba(45, 122, 78, 0.15);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212,175,55,0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212,175,55,0.4);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-danger {
    background: #fff5f5;
    color: #e53e3e;
    border-left: 4px solid #e53e3e;
}

/* Custom form wrapper for login page */
.login-container {
    max-width: 500px;
    margin: 4rem auto;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 3.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.02);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.login-header-logo img {
    width: 60px;
}

.login-header h2 {
    color: var(--green-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-footer-links a {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-footer-links a:hover {
    color: var(--green-medium);
}

/* ==========================================
   CALL TO ACTION & FOOTER
========================================== */
.cta-section {
    background: linear-gradient(135deg, var(--green-primary), var(--green-dark));
    text-align: center;
    padding: 5rem 6%;
    color: #fff;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(212,175,55,0.3);
    transition: var(--transition);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(212,175,55,0.4);
}

footer {
    background: var(--green-dark);
    color: #94a3b8;
    padding: 4rem 6%;
    text-align: center;
}

.footer-logo {
    width: 60px;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

footer h3 {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
}

footer p {
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto 0.5rem;
    opacity: 0.8;
}

.copyright {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ==========================================
   CONTACT PAGE SPECIFIC
========================================== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 6% 5rem;
}

.contact-info {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.02);
}

.contact-info h3 {
    color: var(--green-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info p i {
    color: var(--gold);
    font-size: 1.2rem;
}

.map-container {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    border: 1px solid rgba(0,0,0,0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-form {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.02);
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--green-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: #fff;
    border-color: var(--green-medium);
    box-shadow: 0 0 0 4px rgba(45, 122, 78, 0.15);
}

.contact-form button {
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212,175,55,0.3);
    transition: var(--transition);
    width: 100%;
    margin-top: 0.5rem;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212,175,55,0.4);
}

.admission-note {
    background: var(--green-bg);
    border-left: 4px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--green-dark);
    margin-top: 1.5rem;
}

/* ==========================================
   SPLIT-SCREEN LOGIN LAYOUT
========================================== */
.split-layout {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    background: var(--surface);
    overflow: hidden;
}

.cover-section {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    display: none;
}

@media(min-width: 992px) {
    .cover-section {
        display: block;
    }
}

.cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 59, 42, 0.94) 0%, rgba(26, 92, 62, 0.65) 100%);
    z-index: 2;
}

.cover-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5rem;
    color: white;
}

.cover-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cover-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 500px;
    color: #e2e8f0;
}

.cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
    color: var(--gold);
    width: fit-content;
}

.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--surface);
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-dark);
    letter-spacing: -0.5px;
}

.logo-text strong {
    color: var(--gold);
}

.greeting h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.greeting p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

/* ==========================================
   MEDIA QUERIES (RESPONSIVE)
========================================== */
@media(max-width: 992px) {
    .grid-2,
    .admission-container,
    .headteacher-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

@media(max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: var(--green-dark);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1.2rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    
    nav ul.active {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .container,
    .headteacher-section,
    .values-section,
    .admission-section,
    .events-section {
        padding: 3.5rem 5%;
    }
    
    .hero-stat .num {
        font-size: 1.6rem;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .admission-content,
    .login-container {
        padding: 2rem 1.5rem;
    }
}
