/* ==========================================================================
   1. MAINĪGIE UN PAMATA IESTATĪJUMI
   ========================================================================== */

:root {
    --background: 38 38% 95%;
    --foreground: 25 20% 18%;
    --primary: 95 14% 38%;
    --terracotta: 18 45% 55%;
    --cream: 38 50% 96%;
    --border: 32 22% 82%;
    --radius: 2rem; 
    --serif: 'Fraunces', serif;
    --sans: 'Inter', sans-serif;
    --shadow: 0 10px 40px -15px hsl(25 30% 25% / 0.1);
    --dark-green: 160 50% 20%; 
    --forest-green: 150 45% 25%; 
    --light-sage-green: 150 35% 35%; 
}

/* Maiga ritināšana visai lapai */
html {
    scroll-behavior: smooth;
}

/* Atstarpe ritinot uz sekcijām, lai navigācija tās neaizsedz */
#gallery, #about, #contact {
    scroll-margin-top: 6rem; 
}

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

body {
    background-color: hsl(var(--background));
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(hsl(25 20% 18% / .025) 1px, transparent 1px);
    background-size: 24px 24px;
    color: hsl(var(--light-sage-green));
}

h1, h2, .logo {
    font-family: 'Playfair Display', serif !important;
    font-weight: 700;
}

/* ==========================================================================
   2. NAVIGĀCIJA
   ========================================================================== */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: relative; 
    background-color: hsl(var(--background)); 
    width: 100%;
    z-index: 100;
}

.logo {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: hsl(var(--primary));
}

.logo-img {
    height: 70px; 
    width: auto;  
    display: block;
}

.nav-links a {
    text-decoration: none;
    color: hsl(var(--foreground));
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-left: 2.5rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 0.6; }

/* ==========================================================================
   3. HERO SADAĻA
   ========================================================================== */

.hero {
    min-height: calc(90vh - 80px); 
    display: flex;
    align-items: center;
    padding-top: 2rem; 
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 6rem; 
    width: 100%;
    margin: 0 auto;
    padding-left: 5%; 
    align-items: center;
}

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

.subtitle {
    color: hsl(var(--terracotta));
    font-style: italic;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.highlight {
    color: hsl(var(--light-sage-green)); 
    font-style: italic;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-primary {
    background-color: hsl(var(--terracotta));
    color: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.btn-primary:hover { opacity: 0.8; }

.btn-secondary {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-secondary:hover { color: hsl(var(--terracotta)); }

.hero-image {
    height: 90vh; 
}

.hero-image img {
    width: 80%;
    height: 80%;
    object-fit: cover; 
    border-radius: 2rem; 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); 
}

/* ==========================================================================
   4. GALERIJA (KOLEKCIJA)
   ========================================================================== */

.gallery-section {
    padding: 2rem 5% 8rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.card {
    text-decoration: none;
    color: inherit;
    display: block;
    max-width: 400px; 
    margin: 0 auto;
    width: 100%;
}

.img-container {
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background-color: hsl(var(--cream));
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.card:hover img { transform: scale(1.03); }

.card-info {
    padding: 1.5rem 0.5rem;
    text-align: center;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.card-info p {
    font-weight: 500;
    color: hsl(var(--terracotta));
    font-size: 0.9rem;
}

/* ==========================================================================
   5. PAR MANI (ABOUT)
   ========================================================================== */

.about-section {
    background-color: hsl(var(--primary));
    color: white;
    padding: 6rem 5%;
    margin: 0 5% 6rem;
    border-radius: var(--radius);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

.about-text h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ==========================================================================
   6. KONTAKTI (CONTACT)
   ========================================================================== */

.contact-section {
    padding: 30px 10px;
    background-color: transparent; 
    color: hsl(var(--foreground));
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    animation: slideDown 0.4s ease-out;
}

.alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid hsl(var(--border));
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.btn-submit {
    background-color: hsl(var(--terracotta)); 
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.btn-submit:hover { opacity: 0.8; }

.contact-details { list-style: none; padding: 0; margin-top: 20px; }
.contact-details li { margin-bottom: 8px; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   7. KĀJENE (FOOTER)
   ========================================================================== */

footer {
    padding: 4rem 5%;
    text-align: center;
    border-top: 1px solid hsl(var(--border));
    margin-top: 4rem;
}

.footer-logo {
    font-family: var(--serif);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   8. MOBILĀ VERSIJA (ADAPTIVITĀTE)
   ========================================================================== */

@media (max-width: 850px) {
    /* --- 1. Navigācija --- */
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 5%;
    }
    
    .logo-img {
        height: 50px; /* Mazāks logo mobilajā versijā */
    }
    
    .nav-links { 
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 0.75rem; /* Mazāks fonta izmērs saitēm */
    }

    /* --- 2. Hero sadaļa --- */
    .hero {
        padding-top: 1rem;
        min-height: auto; /* Atļaujam augstumam pielāgoties satura daudzumam */
    }

    .hero-container {
        grid-template-columns: 1fr; 
        padding: 2rem 5%;
        gap: 2rem;
        text-align: center; /* Iecentrējam tekstu labākam "tonim" */
    }

    .hero h1 {
        font-size: 2.5rem; /* Samazinām, lai neaizņem visu ekrānu */
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        height: 40vh; /* Mazāks augstums, lai nav jāritina bezgalīgi */
        order: -1; /* PĀRCEL BILDĪTI VIRS TEKSTA (pēc izvēles, vizuāli izskatās labāk) */
    }
    
    .hero-image img {
        width: 100%;
        height: 100%;
        border-radius: 1.5rem;
    }

    /* --- 3. Galerija un About --- */
    .grid, .about-container { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }
    
    .about-section {
        margin: 0 0 4rem 0; /* Noņemam sānmalas, lai izmantotu pilnu platumu */
        border-radius: 0; /* Modernāks skats uz mobilajiem */
        padding: 4rem 5%;
    }

    .about-text h2 { 
        font-size: 2rem; 
    }

    /* --- 4. Kontaktu sadaļa --- */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 5%;
    }

    .contact-info h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .contact-info p {
        text-align: center;
    }

    .contact-details {
        text-align: center;
    }
}

/* PIEZĪME: Pārliecinies, ka šeit nav lieku "}" zīmju! */