/* CSS Variables for Theme Management */
:root {
    --bg-primary: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 15%, rgba(241, 245, 249, 1) 35%, rgba(248, 250, 252, 1) 65%, rgba(255, 255, 255, 1) 100%);
    --bg-secondary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --bg-card: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #D2130a;
    --accent-hover: #b10e09;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #D2130a 0%, #ff4757 100%);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(90deg, rgba(4, 4, 20, 1) 0%, rgba(25, 3, 45, 1) 8%, rgba(35, 20, 20, 1) 50%, rgba(20, 20, 35, 1) 78%, rgba(30, 3, 3, 1) 97%);
    --bg-secondary: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    --bg-card: linear-gradient(135deg, #2d2d2d 0%, #353535 100%);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #cccccc;
    --border-color: #404040;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-smooth);
    overflow-x: hidden;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

[data-theme="dark"] body {
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

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

h1 { font-size: clamp(1.75rem, 3.5vw, 2.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Theme Toggle Container */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}



/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--accent-primary);
    color: white;
}

/* Main Content */
.main {
    margin-top: 0;
}

/* Section Styles */
.section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-primary)10 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    max-width: 300px;
    margin: 0 auto 3rem;
    animation: pulse 3s ease-in-out infinite;
}

.hero-logo-light {
    display: block;
}

.hero-logo-dark {
    display: none;
}

[data-theme="dark"] .hero-logo-light {
    display: none;
}

[data-theme="dark"] .hero-logo-dark {
    display: block;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}



.hero h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

[data-theme="dark"] .hero h1 {
    color: #ffffff;
}

[data-theme="light"] .hero h1 {
    color: #000000;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-spring);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(210, 19, 10, 0.1), transparent);
    transition: var(--transition-smooth);
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(210, 19, 10, 0.1);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(210, 19, 10, 0.2);
}

/* Enhanced card icon animation */
.card-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: block;
    transition: var(--transition-spring);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 5px 10px rgba(210, 19, 10, 0.3));
}

/* Card title animation */
.card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.card:hover h3 {
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* Card content animation */
.card p {
    transition: var(--transition-smooth);
}

.card:hover p {
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition-spring);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(210, 19, 10, 0.3);
}

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

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

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(210, 19, 10, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Social Media */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-spring);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-5px) rotate(5deg);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card Hover Animations */
.card {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* Smooth scroll animations */
.section {
    animation-delay: 0.2s;
}

/* Enhanced button animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-smooth);
}

.btn:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }

    .section {
        padding: 2rem 0;
    }

    .hero {
        padding: 4rem 0;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links {
        flex-wrap: wrap;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .theme-toggle-container, .btn { display: none; }
    .section { page-break-inside: avoid; }
}

/* Advanced animations for better UX */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Card entrance animations */
.card:nth-child(odd) {
    animation: slideInLeft 0.6s ease-out;
}

.card:nth-child(even) {
    animation: slideInRight 0.6s ease-out;
}

/* Enhanced card group interactions */
.cards-grid {
    transition: var(--transition-smooth);
}

.cards-grid:hover .card:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
}

.cards-grid .card {
    transition: var(--transition-spring), opacity 0.3s ease, transform 0.3s ease;
}

/* Additional hover effects for more cards */
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced hover effects for social links */
.social-link {
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(210, 19, 10, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition-smooth);
}

.social-link:hover::after {
    width: 100%;
    height: 100%;
}

/* Advantages Section */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    text-align: center;
}

.advantage-item {
    padding: 2rem 1rem;
    transition: var(--transition-smooth);
}

.advantage-item:hover {
    transform: translateY(-8px);
}

.advantage-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: block;
    transition: var(--transition-spring);
}

.advantage-item:hover .advantage-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 5px 10px rgba(210, 19, 10, 0.3));
}

.advantage-item h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.advantage-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}



/* Form focus animations */
.form-control {
    position: relative;
}

.form-group {
    position: relative;
}

.form-group label {
    transition: var(--transition-smooth);
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    transform: translateY(-25px) scale(0.8);
    color: var(--accent-primary);
}