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

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
}

main {
    flex: 1;
}

/* =========================
   CONTAINER
========================= */
.container {
    width: 1200px;
    max-width: 95%;
    margin: auto;
}

/* =========================
   HEADER
========================= */
header {
    background: #111;
    padding: 15px 0;
}

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

.logo img {
    height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover,
nav a.active {
    color: #f39c12;
}

/* =========================
   HERO
========================= */
.hero {
    min-height: 70vh;
    background: url('images/hero.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

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

.hero h1 {
    font-size: 50px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 22px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    background: #f39c12;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
    display: inline-block;
}

.btn:hover {
    background: #d35400;
}

/* =========================
   SERVICES
========================= */
.services {
    padding: 80px 0;
    background: white;
    text-align: center;
}

.services h2 {
    margin-bottom: 50px;
    font-size: 36px;
}

.service-boxes {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.service {
    background: #f9f9f9;
    padding: 40px;
    width: 350px;
    border-radius: 10px;
    transition: 0.3s;
}

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

/* =========================
   GALERII ÜLDINE
========================= */
.gallery-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 20px;
}

.gallery-container h1 {
    margin-bottom: 30px;
}

/* =========================
   ALBUM GRID
========================= */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 30px;
}

.album-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.album-card:hover {
    transform: translateY(-6px);
}

.album-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 200px;
}

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

.album-title {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    background: #222;
    color: white;
}

/* =========================
   ALBUMI SEES PILDID
========================= */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.image-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-card img:hover {
    transform: scale(1.08);
}

.back-btn {
    display: inline-block;
    margin-bottom: 25px;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: bold;
}

/* =========================
   LIGHTBOX
========================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.prev { left: 40px; }
.next { right: 40px; }

/* =========================
   LOGIN
========================= */
.login-box {
    width: 350px;
    margin: 120px auto;
    padding: 40px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* =========================
   ADMIN
========================= */
.admin-panel {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
}

.admin-panel h1 {
    margin-bottom: 20px;
}

.logout {
    float: right;
    background: red;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
}

.admin-section {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.admin-section input,
.admin-section select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-section button {
    padding: 12px 20px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}




/* =========================
   ADMIN IMAGE GRID
========================= */

.admin-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.admin-image-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: 0.3s;
}

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

.admin-image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.admin-image-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.delete-btn:hover {
    background: #c0392b;
}





.error {
    color: red;
    text-align: center;
}



.images-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.image-card {
    width: calc(33.333% - 20px) !important;
}

.admin-header {
    background: #111;
    padding: 20px;
}

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

.admin-nav a {
    color: white;
    text-decoration: none;
}

/* =========================
   CONTACT
========================= */

.contact-section {
    padding: 100px 20px;
    background: #f4f6f9;
}

.contact-box {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.contact-box h1 {
    text-align: center;
    margin-bottom: 15px;
}

.contact-box p {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
}

.success {
    background: #2ecc71;
    color: white;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}


/* =========================
   FOOTER
========================= */
footer {
    background: #111;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}



/* MEIST LEHT */
.about-wrapper {
    padding: 100px 20px;
    background: #f4f4f4;
}

.about-box {
    max-width: 900px;
    margin: 0 auto;  /* see tsentreerib */
    background: #ffffff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-size: 18px;
    line-height: 1.7;
    color: #222;
}

/* pealkirjad TinyMCE-st */
.about-box h1,
.about-box h2,
.about-box h3 {
    text-align: center;
    margin-bottom: 25px;
}

/* pildid TinyMCE-st */
.about-box img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 30px auto;
}

/* lõigud */
.about-box p {
    margin-bottom: 20px;
}




/* WHY US */
.why-us {
    padding: 80px 20px;
    background: white;
    text-align: center;
}

.why-us h2 {
    font-size: 36px;
    margin-bottom: 50px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.why-card {
    background: #f9f9f9;
    padding: 40px 30px;
    border-radius: 12px;
    transition: 0.3s;
}

.why-card:hover {
    transform: translateY(-8px);
}

.why-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.why-card h3 {
    margin-bottom: 15px;
}