/* 
   Dr. Retha Silvis - Virtual GP Consultations
   Main Stylesheet
*/

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Enhanced colors for better contrast */
    --primary-color: #e05858; /* Darker red for better contrast */
    --secondary-color: #d84545; /* Darker secondary for better contrast */
    --accent-color: #c73a3a; /* Darker accent for better contrast */
    --light-color: #ffffff;
    --dark-color: #222222; /* Darker for better contrast */
    --grey-color: #fef2f2;
    --text-color: #333333; /* Darker for better contrast */
    --border-color: #ffd8d8;
    --shadow: 0 4px 6px rgba(244, 124, 124, 0.15);
    --transition: all 0.3s ease;
    --focus-outline: 3px solid #c73a3a;
    
    /* Hexagon pattern colors */
    --hex-color-1: #e05858; /* Bright coral */
    --hex-color-2: #d84545; /* Medium coral */
    --hex-color-3: #ffc2c2; /* Light coral */
    --hex-color-4: #ffdbdb; /* Very light coral */
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Remove underline from nav menu items on hover */
.nav-menu a:hover {
    text-decoration: none;
}

a:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
    text-decoration: underline;
}

/* Skip navigation link */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
    text-decoration: none;
}

.skip-nav:focus {
    top: 0;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.5px;
    /* Ensure buttons are accessible with keyboard */
    position: relative;
}

/* Improve focus styles for buttons */
.btn:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
}

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

.primary-btn:hover {
    background-color: var(--accent-color);
    color: var(--light-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    z-index: 1000;
}

/* Header Banner */
.header-banner {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    padding: 8px 8px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease-in-out;
}

.header-banner a {
    color: var(--light-color);
    text-decoration: underline;
    font-weight: 600;
}

.header-banner a:hover {
    color: var(--light-color);
    opacity: 0.9;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    padding: 16px 0;
}
.logo h1 {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.logo p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--secondary-color);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.register-btn a {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.register-btn a:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    /* Improve accessibility */
    min-width: 44px;
    min-height: 44px;
}

/* Improve focus styles for mobile menu button */
.mobile-menu-btn:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 150px 0 80px;
    background-color: #ffd8d8;
    /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cdefs%3E%3Cpattern id='hexagons' width='84' height='96' patternUnits='userSpaceOnUse'%3E%3Cpath d='M42 0l36.6 21v42L42 84 5.4 63V21L42 0z' fill='%23ffd8d8'/%3E%3Cpath d='M0 21L36.6 0 73.2 21v42L36.6 84 0 63V21z' fill='%23ffc5c5'/%3E%3Cpath d='M42 96l36.6-21V33L42 12 5.4 33v42L42 96z' fill='%23f8a0a0'/%3E%3Cpath d='M84 63L47.4 84 10.8 63V21L47.4 0 84 21v42z' fill='%23f47c7c'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hexagons)'/%3E%3C/svg%3E"); */
    background-size: 84px 96px;
}

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

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 400px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 80px 0;
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1.5;
}

.about-credentials {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.credential {
    background-color: var(--grey-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.credential:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.credential i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.credential h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.credential p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 80px 0;
    background-color: var(--grey-color);
    /* background-image: url("data:image/svg+xml,%3Csvg width='120' height='140' viewBox='0 0 120 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='hexagons' width='60' height='104' patternUnits='userSpaceOnUse' patternTransform='scale(1) rotate(0)'%3E%3Cpath d='M0,52 L30,0 L60,52 L60,104 L30,156 L0,104 Z' fill='%23ffdbdb'/%3E%3Cpath d='M60,52 L90,0 L120,52 L120,104 L90,156 L60,104 Z' fill='%23ffc2c2'/%3E%3Cpath d='M30,52 L60,0 L90,52 L90,104 L60,156 L30,104 Z' fill='%23faa0a0'/%3E%3Cpath d='M30,0 L60,-52 L90,0 L90,52 L60,104 L30,52 Z' fill='%23f47c7c'/%3E%3Cpath d='M-30,52 L0,0 L30,52 L30,104 L0,156 L-30,104 Z' fill='%23faa0a0'/%3E%3Cpath d='M30,104 L60,52 L90,104 L90,156 L60,208 L30,156 Z' fill='%23f47c7c'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hexagons)'/%3E%3C/svg%3E"); */
    background-size: 120px 140px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(244, 124, 124, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    margin-bottom: 0;
}

/* ===== PRICING SECTION ===== */
.pricing {
    padding: 80px 0;
    background-color: var(--light-color);
}

.pricing-note {
    text-align: center;
    margin-bottom: 2rem;
    font-style: italic;
}

.pricing-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-table {
    background-color: var(--grey-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pricing-table:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.pricing-header {
    background-color: var(--primary-color);
    padding: 20px;
    text-align: center;
    border-radius: 10px 10px 0 0;
}

.pricing-header h3 {
    color: var(--light-color);
    margin-bottom: 0;
    font-size: 1.5rem;
}

.pricing-body {
    padding: 30px;
}

.pricing-body ul {
    list-style: none;
    padding: 0;
}

.pricing-body li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-body li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.price {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 80px 0;
    background-color: var(--grey-color);
    /* background-image: url("data:image/svg+xml,%3Csvg width='120' height='140' viewBox='0 0 120 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='hexagons' width='60' height='104' patternUnits='userSpaceOnUse' patternTransform='scale(1) rotate(0)'%3E%3Cpath d='M0,52 L30,0 L60,52 L60,104 L30,156 L0,104 Z' fill='%23ffdbdb'/%3E%3Cpath d='M60,52 L90,0 L120,52 L120,104 L90,156 L60,104 Z' fill='%23ffc2c2'/%3E%3Cpath d='M30,52 L60,0 L90,52 L90,104 L60,156 L30,104 Z' fill='%23faa0a0'/%3E%3Cpath d='M30,0 L60,-52 L90,0 L90,52 L60,104 L30,52 Z' fill='%23f47c7c'/%3E%3Cpath d='M-30,52 L0,0 L30,52 L30,104 L0,156 L-30,104 Z' fill='%23faa0a0'/%3E%3Cpath d='M30,104 L60,52 L90,104 L90,156 L60,208 L30,156 Z' fill='%23f47c7c'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hexagons)'/%3E%3C/svg%3E"); */
    background-size: 120px 140px;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-item {
    background-color: var(--light-color);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-item p {
    margin-bottom: 0;
}

.register-cta {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: var(--light-color);
    box-shadow: var(--shadow);
}

.register-cta h3 {
    color: var(--light-color);
    font-size: 1.5rem;
}

.register-cta p {
    margin-bottom: 20px;
}

.register-cta .btn {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.register-cta .btn:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 0 20px;
    /* background-image: url("data:image/svg+xml,%3Csvg width='120' height='140' viewBox='0 0 120 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='hexagons' width='60' height='104' patternUnits='userSpaceOnUse' patternTransform='scale(1) rotate(0)'%3E%3Cpath d='M0,52 L30,0 L60,52 L60,104 L30,156 L0,104 Z' fill='%23444444'/%3E%3Cpath d='M60,52 L90,0 L120,52 L120,104 L90,156 L60,104 Z' fill='%23555555'/%3E%3Cpath d='M30,52 L60,0 L90,52 L90,104 L60,156 L30,104 Z' fill='%23666666'/%3E%3Cpath d='M30,0 L60,-52 L90,0 L90,52 L60,104 L30,52 Z' fill='%23555555'/%3E%3Cpath d='M-30,52 L0,0 L30,52 L30,104 L0,156 L-30,104 Z' fill='%23444444'/%3E%3Cpath d='M30,104 L60,52 L90,104 L90,156 L60,208 L30,156 Z' fill='%23666666'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hexagons)' opacity='0.15'/%3E%3C/svg%3E"); */
    background-size: 120px 140px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    color: var(--light-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--light-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact a:hover {
    color: var(--light-color);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--light-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .services-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* ===== WHATSAPP FAB BUTTON ===== */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background-color: #128C7E; /* Darker WhatsApp green for better contrast */
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background-color: #075E54; /* Even darker on hover for better contrast */
    text-decoration: none;
}

.whatsapp-fab:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.whatsapp-fab i {
    color: white;
}

.whatsapp-fab .tooltip {
    position: absolute;
    right: 80px;
    background-color: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.whatsapp-fab:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.whatsapp-fab .tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
}

@media (max-width: 576px) {
    .whatsapp-fab {
        bottom: 20px;
        right: 20px;
        width: 65px;
        height: 65px;
        font-size: 32px;
    }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Higher opacity for better contrast */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(244, 124, 124, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* High contrast focus styles for all interactive elements */
button:focus,
input:focus,
select:focus,
textarea:focus,
[role="button"]:focus,
[tabindex]:focus {
    outline: var(--focus-outline);
    outline-offset: 3px;
}

/* Improve visibility of current section for keyboard navigation */
section:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Ensure text remains visible during webfont load */
html {
    font-display: swap;
}

/* Improve text contrast in various components */
/* .service-card h3,
.credential h3,
.contact-item h3,
.pricing-header h3 {
    color: var(--dark-color);
} */

.service-card p,
.credential p,
.contact-item p {
    color: var(--text-color);
}

/* Ensure proper contrast for links in various contexts */
.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.9); /* Improved from 0.7 for better contrast */
}

/* Improve contrast for pricing elements */
.price {
    color: var(--primary-color);
    font-weight: 700; /* Bolder for better visibility */
}

.loading-text {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}