/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Roboto:wght@400;500;700&display=swap');

/* Variables */
:root {
    /* Latvian flag colors and variants */
    --dark-red: #9E2A2B;
    --red: #B71C1C;
    --white: #ffffff;
    
    /* Supporting colors */
    --darker-red: #7A1E1E;
    --light-red: #D32F2F;
    --dark: #212121;
    --gray: #F5F5F5;
    --gray-dark: #757575;
    --light-gray: #EEEEEE;
    
    /* UI variables */
    --font-primary: 'Lato', sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --border-radius: 6px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    color: var(--dark);
}

h1 {
    font-size: 2.75rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--dark-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--red);
}

ul, ol {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    color: var(--dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--dark-red);
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.75rem;
    color: var(--gray-dark);
    font-size: 1.1rem;
}

/* Latvian-inspired ornament */
.latvian-ornament {
    position: relative;
    height: 25px;
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
}

.latvian-ornament::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='25' viewBox='0 0 100 25' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239E2A2B'%3E%3Cpath d='M10,5 L15,5 L12.5,0 Z' /%3E%3Cpath d='M20,5 L25,5 L22.5,0 Z' /%3E%3Cpath d='M30,5 L35,5 L32.5,0 Z' /%3E%3Cpath d='M40,5 L45,5 L42.5,0 Z' /%3E%3Cpath d='M50,5 L55,5 L52.5,0 Z' /%3E%3Cpath d='M60,5 L65,5 L62.5,0 Z' /%3E%3Cpath d='M70,5 L75,5 L72.5,0 Z' /%3E%3Cpath d='M80,5 L85,5 L82.5,0 Z' /%3E%3Cpath d='M90,5 L95,5 L92.5,0 Z' /%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.3;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--dark-red);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--darker-red);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--dark-red);
    border: 2px solid var(--dark-red);
}

.btn-secondary:hover {
    background-color: var(--dark-red);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-cta {
    background-color: var(--red);
    color: var(--white);
    font-size: 1.1rem;
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.btn-cta:hover {
    background-color: var(--light-red);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.875rem 0;
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

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

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark-red);
    font-weight: 700;
    font-size: 1.4rem;
}

.logo a svg {
    margin-right: 0.625rem;
}

.main-nav ul {
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin: 0 1rem;
}

.main-nav ul li a {
    color: var(--dark);
    font-weight: 500;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--dark-red);
    transition: var(--transition);
}

.main-nav ul li a:hover {
    color: var(--dark-red);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--dark-red);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: 9.5rem 0 5rem;
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--dark-red) 50%, transparent 50%);
    background-size: 20px 100%;
}

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

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    color: var(--dark-red);
    margin-bottom: 0.625rem;
}

.hero-content p {
    margin-bottom: 2rem;
    color: var(--gray-dark);
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-graphic {
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--white);
    position: relative;
}

.features::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, transparent 50%, var(--dark-red) 50%);
    background-size: 20px 100%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--dark-red);
}

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

.feature-icon {
    margin: 0 auto 1.25rem;
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(158, 42, 43, 0.05);
    border-radius: 50%;
}

.feature-item h3 {
    margin-bottom: 0.875rem;
    color: var(--dark);
}

.feature-item p {
    color: var(--gray-dark);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background-color: var(--light-gray);
    position: relative;
}

.step-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--dark-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-bottom: 0.875rem;
}

.step-content p {
    margin-bottom: 1.25rem;
    color: var(--gray-dark);
}

.step-icon {
    text-align: center;
}

.action-center {
    text-align: center;
    margin-top: 3rem;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background-color: var(--white);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--dark-red);
}

.accordion-header {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--dark);
}

.accordion-icon {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark-red);
    transition: var(--transition);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    padding-bottom: 1.25rem;
}

.accordion-content p {
    color: var(--gray-dark);
    margin: 0;
    padding-top: 0.625rem;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background-color: var(--light-gray);
    position: relative;
}

.cta-box {
    background: linear-gradient(135deg, var(--dark-red), var(--darker-red));
    border-radius: var(--border-radius-lg);
    padding: 3.75rem 2.5rem;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30,0 L30,60 M0,30 L60,30' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.1'/%3E%3C/svg%3E");
    animation: ctaBg 30s linear infinite;
    pointer-events: none;
}

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

.cta-box h2 {
    color: var(--white);
    margin-bottom: 1.25rem;
    position: relative;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 1.875rem;
    position: relative;
}

.cta-box .btn-cta {
    background-color: var(--white);
    color: var(--dark-red);
}

.cta-box .btn-cta:hover {
    background-color: var(--light-gray);
}

/* Footer */
.site-footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 5rem 0 1.25rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 3.75rem;
}

.footer-brand {
    display: flex;
    margin-bottom: 1.875rem;
    max-width: 350px;
}

.footer-logo {
    margin-right: 0.9375rem;
}

.footer-brand-text h3 {
    color: var(--white);
    margin-bottom: 0.625rem;
}

.footer-brand-text p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 3.75rem;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.625rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--dark-red);
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--white);
    padding-left: 0.3125rem;
}

.keywords li {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    h2 {
        font-size: 1.9rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        z-index: 1000;
        padding: 5rem 1.875rem 1.875rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav ul li {
        margin: 0 0 1.25rem;
        width: 100%;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 0.625rem 0;
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons a {
        width: 100%;
    }
    
    .cta-box {
        padding: 2.5rem 1.25rem;
    }
    
    .footer-links {
        gap: 2rem;
    }
    
    .footer-column {
        width: 100%;
    }
}
