/* Dr. Kaliraj Gastroenterologist Tambaram - Complete CSS */

/* ========================================
   1. CSS Variables & Global Reset
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0056b3;
    --secondary-color: #28a745;
    --accent-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-large: 0 10px 30px rgba(0,0,0,0.2);
    --warning-bg: #fff3cd;
    --warning-border: #ffc107;
    --warning-text: #856404;
    --success-bg: #e8f5e9;
    --info-bg: #e3f2fd;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #fff;
}

/* ========================================
   2. Typography
   ======================================== */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-color);
}

p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   3. Layout Components
   ======================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* ========================================
   4. Header & Navigation
   ======================================== */
#header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow 0.3s ease;
}

#header.scrolled {
    box-shadow: var(--shadow-large);
}

.navbar {
    padding: 10px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0;
}

.logo span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation Menu */
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow);
    list-style: none;
    padding: 0;
}

.nav-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.nav-menu li {
    border-bottom: 1px solid var(--border-color);
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* ========================================
   5. Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff10" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 15px;
    opacity: 0.95;
}

.hero-description {
    font-size: 0.95rem;
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px auto;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    animation: countUp 2s ease;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* ========================================
   6. Buttons
   ======================================== */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

/* ========================================
   7. Floating Button (Centered at Bottom)
   ======================================== */
.floating-call-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--secondary-color), #20c997);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    animation: pulse 2s infinite;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    z-index: 1000;
    white-space: nowrap;
}

.floating-call-btn:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5);
    background: linear-gradient(135deg, #20c997, var(--secondary-color));
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

/* Mobile adjustments for floating button */
@media (max-width: 480px) {
    .floating-call-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        bottom: 15px;
    }
}

/* ========================================
   8. Symptoms Section
   ======================================== */
.symptoms {
    background: white;
}

.symptoms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.symptom-card {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.symptom-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.symptom-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.symptom-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.symptom-list li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
}

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

.solution-box {
    background: var(--success-bg);
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.solution-box strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 5px;
}

/* Emergency Symptoms Box */
.emergency-symptoms {
    background: var(--warning-bg);
    border: 2px solid var(--warning-border);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 30px;
}

.emergency-symptoms h3 {
    color: var(--warning-text);
    margin-bottom: 15px;
}

.emergency-list {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 500px;
    margin: 0 auto 20px;
}

.emergency-list li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.9rem;
}

.emergency-list li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
}

/* ========================================
   9. Surgery Section
   ======================================== */
.surgery {
    background: var(--light-bg);
}

.surgery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.surgery-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.surgery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.surgery-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.surgery-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.procedure-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.procedure-list li {
    padding: 8px 0;
    font-size: 0.9rem;
    padding-left: 20px;
    position: relative;
}

.procedure-list li:before {
    content: "✓";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.benefits-box {
    background: var(--info-bg);
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.benefits-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* ========================================
   10. Reviews Section
   ======================================== */
.reviews {
    background: var(--light-bg);
}

.review-summary {
    text-align: center;
    margin-bottom: 30px;
}

.rating-display {
    display: inline-block;
    background: white;
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.rating-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin: 10px 0;
}

.review-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.review-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.review-header strong {
    color: var(--dark-color);
}

.review-header .stars {
    color: #ffc107;
    font-size: 1rem;
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.review-card p {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-style: italic;
}

/* ========================================
   11. Contact Section
   ======================================== */
.contact {
    background: var(--light-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-item {
    margin-bottom: 20px;
}

.info-item strong {
    color: var(--dark-color);
    display: block;
    margin-bottom: 5px;
}

.info-item p {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.info-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

.map-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.map-container iframe {
    border-radius: 10px;
    width: 100%;
    height: 450px;
}

/* ========================================
   12. Footer
   ======================================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* ========================================
   13. Responsive Design - Tablet
   ======================================== */
@media (min-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    /* Hero */
    .hero {
        padding: 60px 0;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
    
    /* Buttons */
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        box-shadow: none;
        gap: 20px;
        animation: none;
    }
    
    .nav-menu li {
        border: none;
    }
    
    .nav-menu a {
        padding: 8px 15px;
        border-radius: 5px;
    }
    
    /* Grid Layouts */
    .symptoms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .surgery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ========================================
   14. Responsive Design - Desktop
   ======================================== */
@media (min-width: 992px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Hero */
    .hero {
        padding: 80px 0;
    }
    
    .hero-stats {
        max-width: 700px;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    /* Grid Layouts */
    .symptoms-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    
    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* ========================================
   15. Large Desktop
   ======================================== */
@media (min-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.75rem;
    }
    
    .hero {
        padding: 100px 0;
    }
}

/* ========================================
   16. Print Styles
   ======================================== */
@media print {
    .floating-buttons,
    .mobile-menu-toggle,
    .nav-menu,
    .cta-buttons,
    .map-container {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero {
        background: none;
        color: black;
        padding: 20px 0;
    }
    
    h1, h2, h3 {
        color: black;
    }
}

/* ========================================
   17. Accessibility
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .symptom-card,
    .surgery-card,
    .review-card {
        border: 1px solid var(--dark-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}