:root {
    --primary-color: #003366;
    /* Deep Blue */
    --primary-light: #004a94;
    --secondary-color: #f8f9fa;
    /* White/Light Gray */
    --accent-color: #007bff;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --container-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

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

body {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Header */
#header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo-link {
    display: inline-block;
}

.logo span {
    font-weight: 400;
    color: var(--text-muted);
}

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

nav.desktop-nav ul li a {
    font-weight: 500;
    font-size: 16px;
}

nav.desktop-nav ul li a:hover {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    position: absolute;
    transition: var(--transition);
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 11px;
}

.mobile-menu-btn span:nth-child(3) {
    bottom: 0;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: var(--white);
    padding: 60px 40px;
    transition: 0.4s ease-out;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-content {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-nav-list {
    margin-top: 40px;
}

.mobile-nav-list li {
    margin-bottom: 25px;
}

.mobile-nav-list li a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.mobile-menu-footer p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Hero Section */
#hero {
    min-height: 80vh;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 60px 0;
}

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

.hero-content {
    flex: 1;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 51, 102, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

#hero h2 {
    font-size: 56px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1a1a1a;
}

#hero h2 span {
    color: var(--primary-color);
}

.sub-text {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    margin-right: 15px;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 51, 102, 0.2);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.hero-image {
    flex: 1.2;
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* About Section */
.about-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.about-feature-item {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.about-feature-item h5 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Features Grid */
#features {
    padding: 60px 0;
    margin-top: -60px;
    position: relative;
    z-index: 100;
}

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

.feature-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid #f0f0f0;
}

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

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card.active {
    background: var(--primary-color);
    color: var(--white);
}

.feature-card.active h3 {
    color: var(--white);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.1);
}

/* Section Common */
section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title .sub {
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Medical Staff */
.doctor-profile {
    display: flex;
    align-items: center;
    gap: 60px;
    background: #fbfcfd;
    padding: 50px;
    border-radius: 30px;
}

.doctor-img {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
}

.doctor-info {
    flex: 1.5;
}

.doctor-info h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.doctor-info h3 span {
    font-size: 18px;
    color: var(--accent-color);
    display: block;
}

.specialty-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.career-list {
    margin-bottom: 30px;
}

.career-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.career-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.doctor-info .message {
    font-style: italic;
    background: rgba(0, 123, 255, 0.05);
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Specialty Grid */
.specialty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.specialty-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    transition: var(--transition);
}

.specialty-card .card-img {
    font-size: 40px;
    margin-bottom: 20px;
}

.specialty-card h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.specialty-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.1);
    transform: translateY(-5px);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.review-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    border: 1px solid #eee;
}

.rating {
    margin-bottom: 15px;
    font-size: 14px;
}

.review-text {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 25px;
    line-height: 1.8;
}

.reviewer {
    display: flex;
    flex-direction: column;
}

.reviewer .name {
    font-weight: 700;
    font-size: 15px;
}

.reviewer .tag {
    font-size: 13px;
    color: var(--accent-color);
}

.mt-40 {
    margin-top: 40px;
}

/* Contact Section */
.contact-box {
    display: flex;
    background: var(--primary-color);
    border-radius: 30px;
    overflow: hidden;
    color: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.contact-info {
    flex: 1;
    padding: 60px;
    background: rgba(0, 0, 0, 0.1);
}

.contact-form {
    flex: 1;
    padding: 60px;
    background: var(--white);
    color: var(--text-main);
}

.contact-info h2 {
    font-size: 32px;
    margin-bottom: 40px;
}

.info-list li {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.info-list li strong {
    color: #a5c7eb;
}

.address {
    margin-top: 40px;
}

.address p {
    font-size: 16px;
    opacity: 0.8;
}

.address .tel {
    font-size: 24px;
    font-weight: 700;
    margin-top: 10px;
    opacity: 1;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form select {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.contact-form button {
    margin-top: 10px;
}

/* Floating Widget */
.floating-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.widget-btn {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.widget-btn:hover {
    transform: scale(1.05);
    background: #0056b3;
}

/* Footer */
footer {
    padding: 40px 0;
    background: #f8f9fa;
    color: var(--text-muted);
    border-top: 1px solid #eee;
}

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

/* Mobile Responsive */
@media (max-width: 992px) {
    .contact-box {
        flex-direction: column;
    }

    .reviews-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        width: 30px;
        height: 20px;
        position: relative;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--primary-color);
        position: absolute;
    }

    .mobile-menu-btn span:nth-child(2) {
        top: 9px;
    }

    .mobile-menu-btn span:nth-child(3) {
        bottom: 0;
    }

    #hero {
        height: auto;
        padding: 60px 0;
    }

    #hero .container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    #hero h2 {
        font-size: 36px;
    }

    .sub-text {
        font-size: 16px;
        margin: 0 auto 30px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-right: 0;
    }

    .hero-image {
        display: none;
    }

    .about-grid {
        flex-direction: column;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .grid,
    .specialty-grid {
        grid-template-columns: 1fr;
    }

    .doctor-profile {
        flex-direction: column;
        padding: 30px;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Business & Old Device Optimization (320px - 375px) */
@media (max-width: 375px) {
    .container {
        padding: 0 15px;
    }

    /* Reduce heavy padding in cards */
    .contact-info,
    .contact-form,
    .doctor-profile,
    .feature-card,
    .specialty-card,
    .review-card {
        padding: 25px 20px;
    }

    /* Adjust font sizes */
    #hero h2 {
        font-size: 28px;
        word-break: keep-all;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .logo {
        font-size: 20px;
    }

    /* Mobile Menu adjustments */
    .mobile-menu-content {
        width: 100%;
        padding: 80px 20px 40px;
    }

    .mobile-nav-list li a {
        font-size: 20px;
    }

    /* Floating widget adjustment */
    .floating-widget {
        right: 15px;
        bottom: 20px;
    }

    .widget-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Button adjustments */
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}