
:root {
    --ink: #16323f;
    --muted: #5f7580;
    --brand: #0077b6;
    --brand-dark: #023e8a;
    --accent: #ff8c00;
    --surface: #ffffff;
    --soft: #eef7f7;
    --line: #d8e6e7;
    --shadow: 0 18px 45px rgba(12, 54, 66, .12);
}

* {
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: radial-gradient(circle at top left, rgba(6, 106, 128, .12), transparent 32rem), linear-gradient(180deg, #f7fbfb 0%, #eef6f6 100%) !important;
}

header {
    background: var(--brand) !important;
    color: #ffffff !important;
    padding: 22px 18px 18px !important;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(12, 54, 66, .07);
}

header h1 {
    font-size: clamp(24px, 3vw, 36px) !important;
    line-height: 1.15;
    margin-bottom: 6px !important;
}

header p {
    color: #eaf8ff;
    font-weight: 700;
}

nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px;
    justify-content: center !important;
    padding: 12px 14px;
    background: var(--brand-dark) !important;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    padding: 10px 16px !important;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
    color: #fff !important;
    background: var(--brand) !important;
    outline: none;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff !important;
    text-align: center;
    background: var(--accent) !important;
    padding: clamp(56px, 8vw, 96px) 22px !important;
}

.hero h1 {
    max-width: 920px;
    margin: 0 auto 14px !important;
    font-size: clamp(34px, 5vw, 58px) !important;
    line-height: 1.05;
}

.hero p {
    max-width: 820px;
    margin: 0 auto;
    font-size: clamp(17px, 2.2vw, 22px) !important;
    line-height: 1.55;
}

.about,
.doctor,
.team,
.gallery,
.container,
.services {
    width: min(1120px, calc(100% - 32px)) !important;
    max-width: 1120px !important;
}

.about,
.doctor,
.member {
    align-items: stretch !important;
    gap: 24px !important;
}

.text,
.card {
    background: var(--surface) !important;
    color: var(--ink) !important;
    border: 1px solid var(--line);
    border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
}

.text {
    padding: clamp(24px, 4vw, 40px) !important;
}

.text h2,
.card h2,
.services h2,
.gallery h2 {
    color: var(--brand-dark) !important;
}

.text p,
.card p {
    color: var(--muted);
    line-height: 1.75 !important;
}

.image {
    flex: 1;
    min-width: 280px;
}

.image img,
.photo-grid img,
video {
    width: 100%;
    border-radius: 8px !important;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.image img {
    height: 100% !important;
    min-height: 320px;
    object-fit: cover;
    background: #fff;
}

.services {
    margin: 56px auto !important;
    text-align: center;
}

.cards,
.photo-grid,
.video-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 18px !important;
}

.cards .card {
    min-height: 190px;
    padding: 28px !important;
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cards .card:hover,
.photo-grid img:hover {
    transform: translateY(-3px);
}

.cards .card h3 {
    color: var(--brand-dark);
    margin-bottom: 12px;
    font-size: 22px;
}

.container {
    margin: 42px auto !important;
    padding: 0 !important;
}

.container .card {
    padding: clamp(22px, 4vw, 34px) !important;
}

#register form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

input,
select {
    min-height: 46px;
    color: var(--ink);
    background: #fbfdfd;
    border: 1px solid #cbdedf !important;
    border-radius: 6px !important;
    font-size: 16px !important;
}

input:focus,
select:focus {
    border-color: var(--brand) !important;
    outline: 3px solid rgba(6, 106, 128, .16);
}

button {
    min-height: 46px;
    background: var(--brand) !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(6, 106, 128, .2);
}

button:hover,
button:focus-visible {
    background: var(--brand-dark) !important;
    outline: none;
}

#patientForm button,
body > button {
    background: var(--accent) !important;
}

#patientForm button:hover,
body > button:hover {
    background: #d97700 !important;
}

#patients {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 980px;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

th {
    background: var(--brand-dark) !important;
    color: #fff;
}

td {
    background: #fff;
    color: var(--ink);
}

th,
td {
    padding: 12px 10px !important;
    border-color: var(--line) !important;
}

.deleteBtn {
    min-height: 36px;
    background: #b83232 !important;
    box-shadow: none;
}

body > button {
    display: block;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 24px;
}

footer {
    margin-top: 54px !important;
    padding: 24px !important;
    color: #d9eeee !important;
    background: var(--brand-dark) !important;
    text-align: center;
}

@media (max-width: 760px) {
    header {
        text-align: left !important;
    }

    nav {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding: 10px 12px;
    }

    nav a {
        flex: 0 0 auto;
        padding: 10px 13px !important;
        font-size: 14px;
    }

    .hero {
        text-align: left !important;
        padding: 48px 18px !important;
    }

    .hero h1,
    .hero p {
        margin-left: 0 !important;
    }

    .about,
    .doctor,
    .member {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .team,
    .gallery,
    .container,
    .services,
    .about,
    .doctor {
        width: calc(100% - 24px) !important;
    }

    .text,
    .card {
        border-radius: 8px !important;
    }

    #register form {
        grid-template-columns: 1fr;
    }

    #patientForm button {
        width: 100%;
    }

    .image {
        min-width: 0;
    }

    .image img {
        min-height: 230px;
        max-height: 360px;
    }

    .cards,
    .photo-grid,
    .video-grid {
        grid-template-columns: 1fr !important;
    }

    .photo-grid img,
    video {
        height: auto !important;
        max-height: 360px;
        object-fit: cover;
    }
}

@media (max-width: 420px) {
    header h1 {
        font-size: 23px !important;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .container .card,
    .text,
    .cards .card {
        padding: 20px !important;
    }
}
