/* ===================================
   Hair Design Mahr - Modern Responsive CSS
   =================================== */

/* CSS Variables for consistent theming */
:root {
    /* Original color scheme from iWeb design */
    --primary-color: #7A6449; /* Darkened for WCAG AA compliance */
    --secondary-color: #B8AC96;
    --accent-color: #D4A574;
    --background-color: rgb(255, 253, 250);
    --text-color: rgb(81, 81, 81);
    --text-light: #5A4A3A;
    --border-color: #E5DDD2;
    
    /* Modern additions */
    --gradient-primary: linear-gradient(135deg, #8B7355 0%, #B8AC96 100%);
    --gradient-accent: linear-gradient(135deg, #D4A574 0%, #E5C29F 100%);
    --shadow-sm: 0 2px 4px rgba(44, 36, 22, 0.1);
    --shadow-md: 0 4px 12px rgba(44, 36, 22, 0.15);
    --shadow-lg: 0 8px 24px rgba(44, 36, 22, 0.2);
    --shadow-xl: 0 12px 48px rgba(44, 36, 22, 0.25);
    
    /* Typography */
    --font-primary: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Transitions */
    --transition-fast: 200ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ===================================
   Base Styles
   =================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-secondary);
    font-weight: 400;
    color: var(--text-color);
    background: rgb(184, 172, 150);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--primary-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

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

a:hover {
    color: var(--accent-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===================================
   Header Styles
   =================================== */

.site-header {
    background: rgba(255, 253, 249, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo img {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform var(--transition-base);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
    font-style: italic;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-link {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: var(--space-xs) 0;
    transition: all var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    transition: all var(--transition-base);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    padding: var(--space-2xl) 0;
    background: linear-gradient(rgba(248, 246, 243, 0.9), rgba(237, 232, 224, 0.9)), url('images/Hairdesign-3579.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212,165,116,0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease-out;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    margin-bottom: var(--space-xl);
}

.team-announcement {
    background: rgba(212,165,116,0.15);
    padding: var(--space-sm) var(--space-md);
    border-radius: 25px;
    margin: var(--space-xs) 0 var(--space-md) 0;
    border: 2px solid var(--accent-color);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.team-announcement strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-family: var(--font-primary);
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

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

/* ===================================
   Services Section
   =================================== */

.services {
    padding: var(--space-2xl) 0;
    background: linear-gradient(to bottom, rgba(255,253,250,0.8), rgba(248,246,243,0.9));
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-bottom: var(--space-md);
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: white;
    padding: var(--space-xl);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,165,116,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: 50%;
    margin-bottom: var(--space-md);
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
}

/* ===================================
   Gallery Section
   =================================== */

.visual-highlights {
    padding: var(--space-2xl) 0;
    background: linear-gradient(to bottom, rgba(245,242,238,0.8), rgba(248,246,243,0.9));
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.highlight-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    height: 350px;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.highlight-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.highlight-item:hover img {
    transform: scale(1.1);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    color: white;
    transform: translateY(0);
    transition: all var(--transition-base);
}

.highlight-overlay h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.highlight-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

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

/* ===================================
   Contact Section
   =================================== */

.contact {
    padding: var(--space-2xl) 0;
    background: linear-gradient(to bottom, rgba(248,246,243,0.9), rgba(245,242,238,1));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    position: relative;
}

.contact-info,
.opening-hours {
    background: white;
    padding: var(--space-lg);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.contact-info:hover,
.opening-hours:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-info h3,
.opening-hours h3 {
    color: var(--primary-color);
    margin-bottom: var(--space-md);
}

address {
    font-style: normal;
    margin-bottom: var(--space-md);
}

.contact-item {
    margin-bottom: var(--space-sm);
}

.hours-list {
    display: grid;
    gap: var(--space-sm);
}

.hours-list dt {
    font-weight: 600;
    color: var(--primary-color);
}

.hours-list dd {
    margin-left: 0;
    padding-left: var(--space-md);
}

.note {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background: rgba(212,165,116,0.1);
    border-radius: 10px;
    text-align: center;
    font-style: italic;
}

.map-container {
    grid-column: 1 / -1;
    position: relative;
    z-index: 2;
}

.map {
    height: 400px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    isolation: isolate;
}

.map-iframe {
    border: 0;
    border-radius: 15px;
}

#map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: #e0e0e0;
    border-radius: 15px;
}

.map-consent-box {
    text-align: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--accent-color);
    margin: var(--space-sm);
    max-width: 90%;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.map-consent-box h4 {
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    line-height: 1.2;
    word-wrap: break-word;
}

.map-consent-box p {
    margin-bottom: var(--space-sm);
    color: var(--text-color);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
    word-wrap: break-word;
}

.map-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: center;
    margin-bottom: var(--space-sm);
    width: 100%;
}

.map-buttons .btn {
    width: 100%;
    max-width: 260px;
    padding: var(--space-sm) var(--space-md);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    min-height: 44px;
    position: relative;
    z-index: 20;
}

.privacy-note {
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
    padding: 0 var(--space-xs);
}

.privacy-note a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Tablet and desktop responsive */
@media (min-width: 480px) {
    .map-consent-box {
        padding: var(--space-lg);
        margin: var(--space-md);
        max-width: 500px;
    }
    
    .map-buttons .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .map-consent-box {
        padding: var(--space-xl);
        margin: var(--space-lg);
    }
    
    .map-buttons {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-md);
    }
    
    .map-buttons .btn {
        width: auto;
        max-width: none;
        white-space: nowrap;
    }
    
    .privacy-note {
        font-size: 0.85rem;
    }
}

.google-map-hidden {
    display: none;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background: linear-gradient(to bottom, #F5F2E8, #EDE8E0);
    color: var(--text-color);
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 1px solid rgba(139, 115, 85, 0.3);
}

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

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: var(--text-color);
    transition: color var(--transition-fast);
}

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

.social-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.social-text {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.6;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(139, 115, 85, 0.1);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

/* ===================================
   Accessibility
   =================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    text-decoration: none;
    z-index: 100;
}

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

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Smaller logo on mobile to make room for menu button */
    .logo img {
        height: 48px;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--background-color);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        z-index: 1001;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: var(--space-2xl) var(--space-lg);
        gap: var(--space-md);
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    /* Mobile Hamburger Animation */
    .mobile-menu-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    
    /* Hero adjustments */
    .hero-content {
        padding: 0 var(--space-sm);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Gallery grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    /* Fix overlapping on mobile */
    .contact-info,
    .opening-hours {
        position: relative;
        z-index: 1;
    }
    
    .map-container {
        margin-top: var(--space-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    html {
        font-size: 14px;
    }
    
    /* Even smaller logo on very small screens */
    .logo img {
        height: 40px;
    }
    
    /* Tighter header padding */
    .header-content {
        padding: var(--space-sm) 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .map {
        height: 350px;
    }
}

.date-note {
    margin-top: var(--space-2xl) !important;
    text-align: center !important;
}

/* Print styles */
@media print {
    .site-header,
    .cta-buttons,
    .gallery-preview,
    .map-container,
    .social-links,
    .skip-link {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}