@import 'variables.css';

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
    gap: var(--spacing-md);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Typography Utilities */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.text-white {
    color: var(--light-text);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #00b3b3;
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Header */
header {
    background-color: #ffffff;
    color: #000000;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--background-dark);
    color: var(--light-text);
    padding-top: var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Footer Section Header */
.footer-section h4 {
    color: white;
    /* Explicitly White */
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Footer Links & Text */
.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section ul li i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
    display: inline-block;
    transition: opacity 0.3s;
}

/* Animated Underline Effect */
.footer-section ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease-in-out;
}

.footer-section ul li a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        /* JS will toggle this */
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: #f0f0f0;
        flex-direction: column;
        padding: var(--spacing-md);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    /* .flex-between kept for header logo/menu btn */
}

/* 404 Page Animations */
.error-code {
    text-shadow: 2px 2px 0px var(--primary-color);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Timeline Component */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    /* Adjust based on dot size */
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 60px;
    /* Space for line and dot */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Timeline Dot */
.timeline-marker {
    position: absolute;
    left: 11px;
    /* Center on the 2px line (20px left + 1px half-width - 10px half-dot) */
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--background-light);
    border: 3px solid var(--secondary-color);
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 1);
    /* White halo to break line */
    transition: transform 0.3s ease, background-color 0.3s;
}

.timeline-item:hover .timeline-marker {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

.timeline-content {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(11, 26, 60, 0.05);
    /* Light primary */
    color: var(--primary-color);
    font-weight: 700;
    font-family: var(--font-heading);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.timeline-content p {
    color: #555;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: 1px;
    }

    .timeline-item {
        padding-left: 40px;
    }
}

/* Home Page Components */
.hero-section {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0;
    text-align: center;
    position: relative;
    /* Overlay handled in HTML or here if image is fixed */
}

.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary-color);
}

.card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.card h4 {
    margin-bottom: 15px;
    font-weight: 700;
}