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

:root {
    --bg: #f6f6f6;
    --white: #ffffff;
    --text: #323232;
    --muted: #666666;
    --line: #dddddd;
    --brand: #8ed1ee;
    --brand-dark: #0b2a60;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    --radius: 14px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1100px, 90%);
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.logo {
    font-size: 1.9rem;
    font-weight: 800;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
}

.main-nav a {
    color: #444;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--brand);
}

/* HERO */
.hero {
    background: linear-gradient(135deg, #77bfdf, #7ec6e5);
    padding: 80px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.hero-text {
    color: #fff;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.btn-primary {
    padding: 12px 20px;
    background: var(--brand);
    border-radius: 999px;
    color: #fff;
}

/* SECTIONS */
.section {
    padding: 70px 0;
}

.section-alt {
    background: #ececec;
}

.page-main h1,
.section h2 {
    font-size: 2.4rem;
    margin-bottom: 22px;
}

.intro-text {
    margin-bottom: 40px;
    color: #555;
}

/* CARDS */
.card-grid {
    display: grid;
    gap: 18px;
}

.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.five-cols {
    grid-template-columns: repeat(5, 1fr);
}

.card {
    background: var(--bg);
    border: 1px solid #e1e1e1;
    border-radius: var(--radius);
    padding: 18px;
}

.card img {
    height: 180px;
    object-fit: cover;
}

/* GALLERY FIXED */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.gallery-item img {
    height: 340px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* CONTACT */
.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
}

/* FOOTER */
.site-footer {
    background: var(--brand-dark);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-grid,
    .contact-layout,
    .three-cols {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .five-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .nav-wrap {
        flex-direction: column;
    }
}

.admin-card {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background: #f0f0f0;
}

.admin-table a {
    color: #c0392b;
    font-weight: 700;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    font: inherit;
}
/* Extra final backend styles */
.form-container {
    max-width: 500px;
}

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

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

.form-message {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
}

.form-message.success {
    background: #e7f8ea;
    border: 1px solid #b8e2c1;
    color: #1d6b2f;
}

.form-message.error {
    background: #fdeceb;
    border: 1px solid #f1b8b6;
    color: #a12d2d;
}

.dashboard-grid {
    margin-top: 30px;
}

.gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 16px;
}

.work-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.work-card img {
    height: 220px;
    object-fit: cover;
}

.work-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.9rem;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
}

.split-image img {
    min-height: 300px;
    object-fit: cover;
}

.cta-block {
    margin-top: 40px;
}

@media (max-width: 900px) {
    .gallery-row,
    .split-layout {
        grid-template-columns: 1fr;
    }
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}
.card .btn-primary {
    margin-top: 15px;
    align-self: flex-start;
}