/* 
   Arigato Nagoya Keiba Styles
   A modern, responsive design for horse racing website
*/

:root {
    /* Main color palette */
    --primary: #9c27b0;        /* Purple - brand color */
    --primary-dark: #7b1fa2;
    --primary-light: #e1bee7;
    --secondary: #ff9800;      /* Orange - accent color */
    --secondary-dark: #f57c00;
    --secondary-light: #ffe0b2;
    --dark: #212121;
    --light: #f5f5f5;
    --gray: #757575;
    --light-gray: #e0e0e0;
    --white: #ffffff;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 50%;
    
    /* Box shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
    --shadow-xl: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

/* Base styles and reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    position: relative;
    margin-bottom: var(--spacing-xl);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-md);
}

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

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

section {
    padding: var(--spacing-xxl) 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    color: var(--white);
}

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

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

/* Header and Navigation */
header {
    position: relative;
}

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255,255,255,0.95);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
}

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

.logo img {
    height: 60px;
    width: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--dark);
    transition: all 0.3s ease;
}

.nav-menu ul {
    display: flex;
}

.nav-menu ul li {
    margin-left: var(--spacing-lg);
}

.nav-menu ul li a {
    color: var(--dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: var(--spacing-sm) 0;
    position: relative;
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg.jpg') no-repeat center center/cover;
    height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: var(--spacing-lg);
}

.hero p {
    color: var(--white);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

/* Features Section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    margin-bottom: var(--spacing-lg);
}

.feature-icon img {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

/* Upcoming Races Section */
.race-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.race-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

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

.race-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.race-details {
    display: flex;
    justify-content: space-between;
    margin: var(--spacing-lg) 0;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.news-card {
    background-color: var(--white);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-content {
    padding: var(--spacing-lg);
}

.read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    margin-top: var(--spacing-md);
}

.read-more::after {
    content: " →";
    transition: margin-left 0.3s ease;
}

.read-more:hover::after {
    margin-left: 5px;
}

/* Games Section */
.games {
    background-color: var(--light-gray);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.game-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.game-card h3 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.game-card a {
    font-weight: 600;
    border-bottom: 2px solid var(--primary-light);
}

.game-card a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Testimonials Section */
.testimonial-slider {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
}

.testimonial {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    flex: 1 1 300px;
}

.testimonial-content {
    margin-bottom: var(--spacing-lg);
}

.testimonial-content p {
    font-style: italic;
    position: relative;
}

.testimonial-content p::before {
    content: '"';
    font-size: 3rem;
    position: absolute;
    top: -20px;
    left: -10px;
    opacity: 0.2;
    color: var(--primary);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: var(--spacing-md);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light);
    padding-top: var(--spacing-xxl);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: var(--spacing-xxl);
}

.footer-logo {
    flex: 1 1 300px;
}

.footer-logo p {
    margin-top: var(--spacing-md);
    color: var(--light-gray);
}

.footer-links {
    flex: 2 1 600px;
    display: flex;
    justify-content: space-around;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.footer-col ul li {
    margin-bottom: var(--spacing-md);
}

.footer-col ul li a {
    color: var(--light-gray);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-left: var(--spacing-md);
    transition: all 0.3s ease;
}

.social-links a svg {
    fill: var(--white);
    width: 18px;
    height: 18px;
}

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

/* Responsive design */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: 0;
        background-color: var(--white);
        overflow: hidden;
        transition: height 0.3s ease;
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        height: auto;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: var(--spacing-lg);
    }
    
    .nav-menu ul li {
        margin: var(--spacing-sm) 0;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-col {
        margin-bottom: var(--spacing-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
    }
    
    .copyright {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-grid,
    .race-grid,
    .news-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease;
}

.slide-up {
    animation: slideUp 1s ease;
}
