/* Core Styling Variables - Oxford Premium Slate Blue/Green Aesthetic */
html {
    scroll-behavior: smooth;
}

:root {
    --primary-dark: #0A2229; /* Deep Elite Navy/Teal */
    --accent-gold: #C5A059;  /* Editorial Academic Gold Accent */
    --bg-light: #F8F9FA;     /* Clean Off-White */
    --text-main: #2D3748;    /* Charcoal readable text */
    --text-muted: #718096;
    --card-gradient: rgba(10, 34, 41, 0.82);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header & Navigation - Fixed for Mobile Stacking */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping if space runs out */
    gap: 15px;
}

.logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--primary-dark);
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap; /* Prevents text from breaking onto two lines awkwardly */
}

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

nav a.nav-cta {
    background-color: var(--primary-dark);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 4px;
}

nav a.nav-cta:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

/* Fallback Media Query specifically managing tiny mobile headers */
@media (max-width: 540px) {
    .nav-container {
        flex-direction: column; /* Stacks logo above navigation items */
        text-align: center;
        padding: 15px;
    }
    nav {
        justify-content: center;
        width: 100%;
    }
}

/* Hero Section with Custom Background Image Overlay */
.hero {
    background: linear-gradient(135deg, rgba(10, 34, 41, 0.92) 0%, rgba(23, 66, 79, 0.88) 100%), 
                url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Keeps it clean across all devices */
    color: #ffffff;
    padding: 140px 20px; /* Marginally increased spacing for a grander entrance appearance */
    text-align: center;
}
/* Main Content Section */
.main-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* The Card Deck Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* Individual Card Foundations */
.card {
    position: relative;
    height: 280px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--primary-dark);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Base Overlays to protect text readability over images */
.card-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10,34,41,0.1) 0%, rgba(10,34,41,0.9) 85%);
    z-index: 1;
}

/* Premium Editorial Background Images Linkages */
.card-humanities { 
    background-image: url('humanities.jpg'); 
    background-size: cover;
    background-position: center;
}
.card-social { 
    background-image: url('social.jpg'); 
    background-size: cover;
    background-position: center;
}
.card-natural { 
    background-image: url('natural.jpg'); 
    background-size: cover;
    background-position: center;
}
.card-stem { 
    background-image: url('stem.jpg'); 
    background-size: cover;
    background-position: center;
}
.card-business { 
    background-image: url('business.jpg'); 
    background-size: cover;
    background-position: center;
}
.card-finance { 
    background-image: url('finance.jpg'); 
    background-size: cover;
    background-position: center;
}

.card-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.card p {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 300;
}

/* The Glassmorphic Hover Action Mask */
.card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 34, 41, 0.96); 
    backdrop-filter: blur(4px);
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

/* Hover Actions Trigger States */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(10,34,41,0.15);
}

.card:hover .card-hover-overlay {
    opacity: 1; 
}

/* Multi-choice Action Interactive Buttons inside Hover */
.hover-buttons {
    display: flex;
    flex-direction: column;
    width: 75%;
    gap: 15px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-action i {
    margin-right: 10px;
    font-size: 1rem;
}

.btn-action:hover {
    background-color: #ffffff;
    color: var(--primary-dark);
}

.btn-action.btn-contact {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-action.btn-contact:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

/* Footer layout */
footer {
    background-color: var(--primary-dark);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .card-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   REFINED SUBPAGE & MICRO-GRID ARCHITECTURE
   ========================================================================== */

/* Subpage Hero - Dark, dramatic academic styling to match Homepage */
.sub-hero {
    background: linear-gradient(135deg, rgba(10, 34, 41, 0.95) 0%, rgba(23, 66, 79, 0.90) 100%), 
                url('business.jpg'); /* Reuses your premium corporate/business asset */
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 90px 20px;
    text-align: center; /* Centered alignment for premium presentation */
    border-bottom: 3px solid var(--accent-gold);
}

.sub-hero-content {
    max-width: 800px; /* Constrains line length for pristine readability */
    margin: 0 auto;
}

.discipline-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-gold);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.sub-hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.sub-hero p {
    font-size: 1.15rem;
    font-weight: 300;
    opacity: 0.92;
    line-height: 1.7;
}

/* Premium Subpage Micro-Cards Overrides */
.sub-card {
    background-color: #ffffff !important; /* Forced ultra-clean premium background */
    border: 1px solid #E2E8F0 !important;
    align-items: flex-start !important;
    height: auto !important;
    min-height: 260px;
    padding: 35px 30px !important;
    box-shadow: 0 4px 20px rgba(10, 34, 41, 0.03) !important;
    cursor: default !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* Adds a very subtle premium lift animation on hovering service cards */
.sub-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(10, 34, 41, 0.06) !important;
}

.card-bg-overlay-sub {
    display: none !important; /* Strips out any intrusive visual filters */
}

.sub-card .card-content {
    color: var(--text-main) !important;
}

.sub-card h3 {
    color: var(--primary-dark) !important;
    font-size: 1.35rem !important;
    margin-bottom: 12px;
}

.sub-card p {
    color: var(--text-muted) !important;
    font-weight: 400 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

/* Mini Vector Academic Icon Treatments */
.sub-icon {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    background: rgba(197, 160, 89, 0.08); /* Soft gold ring wrapper */
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Refined Bottom Large Action Area */
.cta-bar {
    background-color: #ffffff;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    padding: 80px 20px;
    margin-top: 80px;
}

.cta-bar h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.cta-bar p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto 30px auto;
}

.btn-cta-large {
    display: inline-block;
    background-color: var(--primary-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(10, 34, 41, 0.15);
}

.btn-cta-large:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.25);
}

/* ==========================================================================
   HOW IT WORKS & PRICING RESPONSIVE STYLING
   ========================================================================== */

/* Timeline Layout */
.timeline-container {
    max-width: 800px;
    margin: 40px auto 0 auto;
    position: relative;
    padding-left: 20px;
}

/* Vertical line for the steps */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #E2E8F0;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.step-number {
    background-color: var(--primary-dark);
    color: var(--accent-gold);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 2;
    box-shadow: 0 0 0 6px #ffffff;
    flex-shrink: 0;
}

.step-content {
    margin-left: 25px;
    padding-top: 5px;
}

.step-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Pricing Grid Layout */
.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0 auto;
    align-items: stretch;
}

.price-card {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(10, 34, 41, 0.05);
}

/* Accent highlight for intermediate card */
.featured-card {
    border: 2px solid var(--accent-gold) !important;
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.1);
}

.featured-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 20px;
}

.custom-card {
    background-color: #f8fafc;
}

.price-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.price-amount {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.price-amount span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    vertical-align: super;
    margin-right: 4px;
}

.price-period {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    flex-grow: 1; /* Pushes the CTA buttons neatly to the card bottoms */
}

.price-features li {
    font-size: 0.92rem;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}

.price-features li i {
    color: var(--accent-gold);
    margin-right: 12px;
    margin-top: 3px;
    font-size: 0.95rem;
}

.btn-price {
    display: block;
    text-align: center;
    background-color: var(--primary-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-price:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

.featured-card .btn-price {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

.featured-card .btn-price:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & SCROLL ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
    /* Closes gap and removes line on mobile view timeline */
    .timeline-container::before {
        left: 20px;
    }
    .timeline-step {
        margin-bottom: 30px;
    }
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        box-shadow: 0 0 0 4px #ffffff;
    }
    .step-content {
        margin-left: 15px;
    }
    .step-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 540px) {
    /* Force simple list look when headers stack on tiny mobile frames */
    .timeline-container::before {
        display: none;
    }
    .timeline-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .step-content {
        margin-left: 0;
        margin-top: 15px;
    }
}

/* ==========================================================================
   MOBILE HEADER NAVIGATION RESTRUCTURING
   ========================================================================== */

@media (max-width: 768px) {
    header {
        padding: 15px 10px !important;
        height: auto !important; /* Allows the header to grow to fit the stacked elements */
    }

    .nav-container {
        flex-direction: column !important; /* Stacks logo above the navigation links */
        gap: 12px;
        align-items: center !important;
        text-align: center;
    }

    header nav {
        display: flex !important;
        flex-wrap: wrap !important; /* Allows links to safely wrap to a second line if the screen is extremely small */
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important; /* Reduces gap between buttons so they fit tightly */
        width: 100%;
    }

    header nav a {
        font-size: 0.8rem !important; /* Slightly reduces text size to maximize screen space */
        padding: 6px 10px !important; /* Snugger padding around links */
    }

    header nav a.nav-cta {
        padding: 8px 14px !important; /* Keeps the "Get in touch" button prominent but compact */
    }
}

@media (max-width: 380px) {
    /* Extreme narrow screen adjustment (e.g., older iPhones) */
    header nav a {
        font-size: 0.75rem !important;
        padding: 4px 6px !important;
    }
}

/* ==========================================================================
   FLOATING BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-dark);
    color: #ffffff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(10, 34, 41, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    border: 1px solid rgba(197, 160, 89, 0.25);
}

/* Class toggled by JavaScript when scrolling */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
    border-color: var(--accent-gold);
}

/* Mobile responsive adjustments so it doesn't block text */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   TOUCHSCREEN VS. HOVER DESKTOP UI SPLIT
   ========================================================================== */

/* 1. DESKTOP ONLY: Enable the hover animation only on devices with a cursor */
@media (hover: hover) {
    .card .card-overlay {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .card:hover .card-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. TOUCHSCREEN ONLY: Make CTAs static and finger-friendly on Mobile/Tablets */
@media (max-width: 768px), (hover: none) {
    /* Disable the hidden translate state so elements are positioned correctly */
    .card .card-overlay {
        opacity: 1 !important;
        transform: none !important;
        position: relative !important; /* Pulls overlay down beneath the image instead of covering it */
        background: #ffffff !important;
        padding: 15px !important;
        border-top: 1px solid #E2E8F0;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        justify-content: center;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Adjust the card structure so the text content and overlay stack beautifully */
    .card {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: auto !important; /* Allows card to fit the persistent buttons */
    }

    /* Make the action buttons span nicely side-by-side for easy thumb tapping */
    .card-overlay a {
        flex: 1;
        text-align: center;
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border-radius: 4px;
    }
}

/* ==========================================================================
   ABOUT US LAYOUT & MOBILE STACKING ENGAGEMENT
   ========================================================================== */
.about-summary-text {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .partner-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 25px 20px !important;
    }
    
    .partner-card img {
        width: 200px !important;
        height: 200px !important;
        margin-bottom: 10px;
    }
    
    .partner-info strong {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
}