/* CSS Variables for The Cheltenham Institute for Digital Defence */
:root {
    /* Color Palette - Traditional yet Modern */
    --oxford-blue: #002147;
    --cambridge-blue: #a3b1b7;
    --ivory: #f7f7f2;
    --gold: #b88746;
    --dark-gold: #8d6b2a;
    --charcoal: #333333;
    --slate: #4a5c6c;
    
    /* Typography */
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sans-serif: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-max-width: 1200px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans-serif);
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--ivory);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--oxford-blue);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}

h3 {
    font-size: 1.8rem;
    color: var(--slate);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Header and Navigation */
.header {
    background: linear-gradient(135deg, var(--oxford-blue) 0%, #001a36 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 0.5rem 0;
    background: var(--oxford-blue);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-text {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-accent {
    color: var(--gold);
    font-weight: 300;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 33, 71, 0.9), rgba(0, 33, 71, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23002147" width="1200" height="800"/><path fill="%23001a36" d="M0,400L1200,200L1200,800L0,800Z"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23b88746' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: var(--cambridge-blue);
    font-weight: 300;
}

.hero-line {
    width: 100px;
    height: 3px;
    background: var(--gold);
    margin: 2rem auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 2px;
    font-family: var(--sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 135, 70, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--oxford-blue);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: var(--section-padding);
}

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

/* About Section */
.about {
    background: white;
}

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

.about-text {
    font-size: 1.2rem;
}

.about-image {
    background: linear-gradient(45deg, var(--oxford-blue), var(--slate));
    height: 400px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.about-image::before {
    content: 'CIDD';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--serif);
}

/* Programs Section */
.programs {
    background: var(--ivory);
}

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

.section-header h2 {
    border: none;
    padding-bottom: 0;
}

.section-tagline {
    color: var(--slate);
    font-size: 1.3rem;
    margin-top: 1rem;
}

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

.program-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--gold);
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.program-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--oxford-blue) 0%, var(--slate) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
    border-color: var(--gold);
}

.cta p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--cambridge-blue);
}

/* Footer */
.footer {
    background: var(--charcoal);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--serif);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-links h4 {
    color: var(--gold);
    margin-bottom: 1.5rem;
}

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

.footer-links a {
    color: var(--cambridge-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--slate);
    padding-top: 2rem;
    text-align: center;
    color: var(--cambridge-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.pt-2 { padding-top: 2rem; }
.pb-2 { padding-bottom: 2rem; }

/* Loading Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Additional Styles for New Sections */

/* About Stats */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--slate);
    margin: 0;
}

/* Research Section */
.research {
    background: white;
}

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

.research-card {
    background: var(--ivory);
    padding: 2rem;
    border-left: 4px solid var(--gold);
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Admissions Section */
.admissions {
    background: var(--ivory);
}

.admissions-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.deadlines, .requirements {
    margin: 2rem 0;
}

.deadlines ul, .requirements ul {
    list-style: none;
    margin-top: 1rem;
}

.deadlines li, .requirements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cambridge-blue);
}

.admissions-cta {
    background: white;
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    align-self: start;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* News Section */
.news {
    background: white;
}

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

.news-card {
    border: 1px solid var(--cambridge-blue);
    padding: 2rem;
    transition: all 0.3s ease;
}

.news-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.news-date {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-link {
    color: var(--oxford-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--gold);
}

/* Program Features */
.program-features {
    list-style: none;
    margin: 1.5rem 0;
}

.program-features li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--cambridge-blue);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--cambridge-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Image Placeholder */
.image-placeholder {
    background: linear-gradient(45deg, var(--oxford-blue), var(--slate));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--serif);
    font-size: 1.2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .admissions-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
