@import 'variables.css';
@import 'preloader.css';

/* --- Components --- */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

/* Header & Nav */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    background-color: #ffffff;
    padding: 8px 15px;
    /* Reduced side padding */
    border-radius: 8px;
    /* box-shadow: var(--shadow-sm); Removed shadow for cleaner mobile look */
}

.logo img {
    height: 50px;
    /* Slightly smaller default */
    width: auto;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li a {
    color: var(--color-primary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-secondary);
    transition: width var(--transition-normal);
}

.nav-links li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #BDC3C7;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    color: #BDC3C7;
    font-size: 0.9rem;
}

/* --- Sections --- */
/* Hero Section */
.hero {
    height: 100vh;
    min-height: 500px;
    /* Reduced min-height */
    background: linear-gradient(rgba(26, 37, 48, 0.7), rgba(26, 37, 48, 0.6)), url('../assets/images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: #E0E0E0;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--color-border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 250px;
    background-color: var(--color-border);
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--spacing-md);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.card-meta {
    font-size: 0.9rem;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* About Grid Class - Replaces Inline Style */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    align-items: center;
}

/* Global Responsive Resets */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Removes bottom space */
}

/* --- RESPONSIVE DESIGN SYSTEM --- */

/* Medium Devices (Tablets, 768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        width: 90%;
        max-width: 960px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .section {
        padding: 50px 0;
    }
}

/* Small Devices (Landscape Mobile & Tablets, max-width: 768px) */
@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
        text-align: center;
        height: auto;
        background: linear-gradient(rgba(26, 37, 48, 0.7), rgba(26, 37, 48, 0.6)), url('../assets/images/hero-bg-mobile.png') center/cover no-repeat;
    }

    .hero-content {
        padding: 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    /* Stack buttons */
    .hero div[style*="display: flex"] {
        flex-direction: column;
        width: 100%;
        gap: 15px !important;
    }

    .hero .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    /* Grids */
    .feature-grid,
    .footer-grid,
    .about-grid {
        grid-template-columns: 1fr !important;
        /* Force single column */
        gap: 25px;
    }

    /* About Image */
    .about-grid .card {
        height: 300px !important;
        /* Fixed height for image container on mobile */
    }

    /* Footer */
    .footer-col {
        text-align: center;
    }

    /* Center align footer logo */
    .footer-col .logo {
        justify-content: center;
    }
}

/* Extra Small Devices (Mobile Phones, max-width: 480px) */
@media (max-width: 480px) {
    .container {
        width: 92%;
    }

    /* Typography adjustment */
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    /* Navbar */
    .logo {
        padding: 5px 0;
        background: transparent;
        /* Remove white box on tiny screens if redundant */
        gap: 10px;
    }

    .logo img {
        height: 40px;
    }

    .logo span {
        display: none;
        /* Hide text if screen is too small, just in case */
    }

    /* Cards */
    .card-img {
        height: 200px;
    }
}