/* Global Styles & Variables */
:root {
    --primary-color: #1a1f3c;
    --secondary-color: #2c3e50;
    --accent-color: #f4d03f;
    --highlight-color: #ff6b81;
    --text-color: #333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

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

/* Header */
header {
    background-color: rgba(26, 31, 60, 0.95);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

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

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switch {
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-login {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-register {
    padding: 8px 20px;
    background-color: #3498db;
    /* Light blue as in design */
    color: white;
    font-size: 0.8rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://placehold.co/1920x1080/1a1f3c/ffffff?text=Great+Race+Background') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px;
}

.hero-content img {
    height: 120px;
    margin: 0 auto 20px;
}

.hero-slogan {
    font-size: 2rem;
    font-style: italic;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Introduction Section */
.intro {
    padding: 80px 0;
    background-color: var(--text-light);
}

.intro .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.intro-text {
    flex: 1;
    border-left: 5px solid var(--primary-color);
    padding-left: 30px;
}

.intro-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.intro-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.intro-image {
    flex: 1;
}

.intro-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Races Section */
.races {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.races h2 {
    color: var(--text-light);
}

.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.race-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.race-card:hover {
    transform: translateY(-10px);
}

.race-img {
    height: 200px;
    background-color: #ddd;
    position: relative;
}

.race-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.race-info {
    padding: 20px;
}

.race-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.race-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #ccc;
}

.view-all-btn {
    text-align: right;
    margin-top: 30px;
}

.view-all-btn a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    border: 1px solid var(--text-light);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* News Section */
.news {
    padding: 80px 0;
    background-color: var(--highlight-color);
}

.news h2 {
    color: var(--text-light);
}

.news h2::after {
    background-color: var(--text-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.news-item {
    background-color: var(--text-light);
    border-radius: 10px;
    height: 250px;
    /* Placeholder height */
    transition: transform var(--transition-speed);
}

.news-item:hover {
    transform: scale(1.05);
}

/* Products Section */
.products {
    padding: 80px 0;
    background-color: var(--accent-color);
}

.products h2 {
    color: var(--text-light);
    /* Or primary color depending on contrast */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.product-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.product-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--text-light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.product-img {
    height: 180px;
    background-color: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 5px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.btn-details {
    font-size: 0.8rem;
    padding: 5px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0 20px;
    text-align: center;
}

.footer-logo img {
    height: 60px;
    margin: 0 auto 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .intro .container {
        flex-direction: column;
    }

    .intro-text {
        border-left: none;
        border-top: 5px solid var(--primary-color);
        padding-left: 0;
        padding-top: 20px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
        /* Simple hide for now, would need a hamburger menu */
    }
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed);
    z-index: 900;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
}

.news-item {
    background-color: var(--text-light);
    border-radius: 10px;
    height: 250px;
    transition: transform var(--transition-speed);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-img-placeholder {
    height: 60%;
    background-color: #ddd;
    background-image: url('https://placehold.co/300x200/ddd/999?text=News');
    background-size: cover;
    background-position: center;
}

.news-content-placeholder {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-line {
    height: 10px;
    background-color: #eee;
    margin-bottom: 8px;
    border-radius: 5px;
}

.news-line.short {
    width: 60%;
}