/*!
 * Lanious Guitars Website Styles
 * Professional guitar repair and custom builds in Charleston, SC
 * 
 * Author: Lanious Guitars
 * Version: 1.0.0
 * License: MIT
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1E5A96; /* Darker blue for better contrast */
    --secondary-color: #7BB3F0;
    --accent-color: #1A4A7A; /* Darker for better contrast */
    --light-gray: #F8F9FA;
    --medium-gray: #495057; /* Darker gray for better contrast */
    --dark-gray: #212529; /* Already good contrast */
    --white: #FFFFFF;
    --text-dark: #212529;
    --text-light: #495057; /* Darker for better contrast */
    --border-color: #DEE2E6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Logo section styles */
.logo-section {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.header.shrink .logo-section {
    margin-bottom: 0.5rem;
}

.header.shrink .main-logo {
    width: 120px !important;
    max-width: 120px !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

/* Reduce animation complexity for better performance */
.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-hover);
}

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

/* Button Link Reset */
.btn:link,
.btn:visited,
.btn:hover,
.btn:active {
    text-decoration: none;
}

/* Ensure buttons maintain styling */
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 0 1rem;
    transition: all 0.3s ease;
}

.header.shrink {
    padding: 0.5rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-section {
    margin-bottom: 1rem;
}

.main-logo {
    width: 250px !important;
    height: auto !important;
    max-width: 250px !important;
    transition: var(--transition);
}

.main-logo:hover {
    transform: scale(1.02);
}

.nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateY(-50%);
    padding: 8px;
    z-index: 1001;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    will-change: transform;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    z-index: 2;
    transform: translateY(150px); /* Much larger downward adjustment */
}

.hero-title {
    display: none;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--white);
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

.hero-quote {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--white);
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    display: none;
}

/* Fallback for browsers that don't support WebP */
.no-webp .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    z-index: 2;
    transform: translateY(150px); /* Much larger downward adjustment */
}

.hero-title {
    display: none;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--white);
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

.hero-quote {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--white);
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    display: none;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    padding: 80px 20px;
    background-color: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

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

.service-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

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

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-list {
    list-style: none;
    text-align: left;
}

.service-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* About Section */
.about {
    padding: 80px 20px;
    background-color: var(--light-gray);
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature i {
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 30px;
}

.feature span {
    font-weight: 500;
    color: var(--text-dark);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    background-color: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0.25rem;
    width: 30px;
}

.contact-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

/* Contact Form */
.contact-form {
    background-color: var(--light-gray);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-dark);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23495057' d='M2 0L0 2h4zM2 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--medium-gray);
}

.form-group select:hover {
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 3rem 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.footer-logo {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes logo white for dark footer */
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* FAQ Section Styles */
.faq {
    padding: 6rem 0;
    background-color: var(--light-gray);
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* Accessibility Utilities */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Enhanced Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Responsive FAQ Styles */
@media (max-width: 768px) {
    .faq {
        padding: 4rem 0;
    }
    
    .faq-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    .faq-item p {
        font-size: 0.95rem;
    }
}

/* Mobile Navigation Styles - Complete Rewrite */
@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
    }
    
    .header-container {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        padding: 0 20px;
    }
    
    .logo-section {
        margin-bottom: 0;
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .main-logo {
        width: 140px;
        height: auto;
        max-width: 140px;
    }
    
    .nav {
        position: absolute;
        right: 20px;
        top: 20px;
        width: auto;
        z-index: 1003;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 8px;
        z-index: 1006;
        background: none;
        border: none;
        position: relative;
    }
    
    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--text-dark);
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1005;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        padding: 2rem 0;
    }
    
    /* Mobile Menu Active State */
    .nav-menu.active {
        right: 0;
    }
    
    /* Mobile Navigation Links */
    .nav-menu .nav-link {
        font-size: 1.3rem;
        font-weight: 500;
        padding: 1.2rem 2rem;
        width: 90%;
        text-align: center;
        color: var(--text-dark);
        text-decoration: none;
        display: block;
        border-radius: 12px;
        margin: 0.4rem 0;
        transition: all 0.3s ease;
        position: relative;
        background: transparent;
    }
    
    .nav-menu .nav-link::after {
        display: none;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link:focus {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        transform: translateX(-5px);
        box-shadow: 0 4px 15px rgba(30, 90, 150, 0.3);
    }
    
    /* Hamburger Animation */
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px) !important;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) !important;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px) !important;
    }
    
    /* Additional selectors to ensure animation works */
    #nav-toggle.active .bar:first-child {
        transform: rotate(45deg) translate(6px, 6px) !important;
    }
    
    #nav-toggle.active .bar:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) !important;
    }
    
    #nav-toggle.active .bar:last-child {
        transform: rotate(-45deg) translate(6px, -6px) !important;
    }
    
    /* Force hamburger bars to respect transforms */
    .header .nav .nav-toggle.active .bar {
        transform-origin: center !important;
    }
    
    /* Mobile Hero Styles */
    .hero {
        padding: 100px 15px 60px;
        min-height: 70vh;
    }
    
    .hero-content {
        transform: translateY(0);
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-quote {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile Services Section */
    .services {
        padding: 60px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    /* Mobile About Section */
    .about {
        padding: 60px 20px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    /* Mobile Contact Section */
    .contact {
        padding: 60px 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Mobile Footer */
    .footer {
        padding: 40px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero {
        padding: 100px 15px 60px;
        min-height: 70vh;
    }
    
    .hero-content {
        transform: translateY(0);
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-quote {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile Services Section */
    .services {
        padding: 60px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    /* Mobile About Section */
    .about {
        padding: 60px 20px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    /* Mobile Contact Section */
    .contact {
        padding: 60px 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Mobile Footer */
    .footer {
        padding: 40px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero {
        padding: 180px 20px 60px;
        min-height: 85vh;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-quote {
        font-size: 1.1rem;
    }
}

/* Very small screens - minimal hero */
@media (max-width: 360px) {
    .hero {
        padding: 120px 15px 30px;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-quote {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation - Reduced complexity for performance */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.service-card,
.contact-item {
    animation: fadeIn 0.3s ease-out;
}

/* Success Message Styles */
.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.success-message.show {
    display: block;
}

.success-message i {
    margin-right: 0.5rem;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.error-message.show {
    display: block;
}

.error-message i {
    margin-right: 0.5rem;
}

/* Button loading state */
.btn-loading {
    display: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled .btn-text {
    display: none;
}

.btn:disabled .btn-loading {
    display: inline;
}

/* Slide in animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
