/**
 * Right Foundation Academy - Main Stylesheet
 * Premium educational platform design with Navy Blue and Golden Yellow branding
 * 
 * Brand Colors:
 * - Primary: #0A2463 (Navy Blue)
 * - Secondary: #FFB81C (Golden Yellow)
 * - Accent: #3498DB (Light Blue)
 */

/* ==================== RESET & BASE STYLES ==================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h5 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h6 { font-size: clamp(1rem, 2vw, 1.25rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }

/* ==================== LAYOUT ==================== */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-sm {
    padding: 3rem 0;
}

.section-lg {
    padding: 7rem 0;
}

/* ==================== ANNOUNCEMENT BAR ==================== */

.announcement-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1000;
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.announcement-text {
    flex-grow: 1;
    text-align: center;
}

.announcement-link {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: underline;
}

.announcement-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== NAVIGATION ==================== */

.navbar {
    background: var(--bg-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 0;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-style: italic;
    margin: 0;
}

/* Navigation Links */
.navbar-menu {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(10, 36, 99, 0.05);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(10, 36, 99, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: var(--secondary-color);
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 36, 99, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    background: rgba(10, 36, 99, 0.2);
    transform: rotate(15deg);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.sun-icon {
    color: var(--secondary-color);
}

.moon-icon {
    color: var(--primary-color);
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    justify-content: center;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 36, 99, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #FFA500 100%);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 184, 28, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 28, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.btn-portal,
.btn-admission {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

/* ==================== CARDS ==================== */

.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* ==================== FORMS ==================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 36, 99, 0.1);
}

.form-control::placeholder {
    color: #999;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

.form-group-inline {
    display: flex;
    gap: 0.5rem;
}

.form-group-inline .form-control {
    flex-grow: 1;
}

/* ==================== GRID SYSTEM ==================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-1 { width: 8.333%; }
.col-2 { width: 16.666%; }
.col-3 { width: 25%; }
.col-4 { width: 33.333%; }
.col-5 { width: 41.666%; }
.col-6 { width: 50%; }
.col-7 { width: 58.333%; }
.col-8 { width: 66.666%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333%; }
.col-11 { width: 91.666%; }
.col-12 { width: 100%; }

/* ==================== SECTION HEADERS ==================== */

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

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==================== HERO SECTION ==================== */

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 36, 99, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== STATISTICS ==================== */

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== FOOTER ==================== */

.footer {
    background: var(--primary-color);
    color: white;
}

.footer-main {
    padding: 4rem 0 2rem;
}

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

.footer-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-menu a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--secondary-color);
}

.footer-newsletter {
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem 0;
}

.newsletter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.newsletter-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.newsletter-icon {
    font-size: 3rem;
    color: var(--secondary-color);
}

.newsletter-text h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.newsletter-form-wrapper {
    flex: 1;
    min-width: 300px;
}

.newsletter-form .form-control {
    border-radius: 8px 0 0 8px;
}

.newsletter-form .btn {
    border-radius: 0 8px 8px 0;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

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

.separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(255, 184, 28, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 184, 28, 0.4);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-menu-container {
    position: absolute;
    right: 0;
    top: 0;
    width: 320px;
    max-width: 90%;
    height: 100%;
    background: var(--bg-primary);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
    padding: 1.5rem;
}

.mobile-nav-links {
    margin-bottom: 2rem;
}

.mobile-nav-item {
    margin-bottom: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(10, 36, 99, 0.1);
    color: var(--primary-color);
}

.mobile-menu-actions {
    margin-bottom: 2rem;
}

.mobile-menu-actions .btn {
    margin-bottom: 0.75rem;
}

.mobile-menu-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.mobile-contact-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mobile-social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mobile-social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 36, 99, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.mobile-social-links a:hover {
    background: var(--primary-color);
    color: white;
}
