/* Gal's Garage Custom Styles */
/* Extends Tailwind CSS with custom styling */

:root {
    --color-primary: #F43F7A; /* Hot Pink - Gal's Garage signature color */
    --color-primary-dark: #A61D55; /* Deep Berry/Magenta */
    --color-secondary: #333333; /* Dark charcoal for text */
    --color-accent: #E57A9E; /* Medium pink accent */
    --color-dark: #1a1a1a; /* Near black */
    --color-pink-light: #FACDD6; /* Light pink for backgrounds */
    --color-pink-medium: #F9C5D1; /* Medium light pink */
}

/* Font Definitions */
body {
    font-family: 'Montserrat', sans-serif;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

/* Hero Section Background */
.hero-section {
    background-image: url('/assets/images/hero/hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Header Ruler Border */
.header-ruler {
    width: 100%;
    height: 20px;
    background-image: url('/assets/images/hero/ruler.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    filter: brightness(0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(244, 63, 122, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: 2px solid white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

/* Navigation */
.nav-link {
    position: relative;
    outline: none;
}

.nav-link:focus {
    outline: none;
}

.nav-dropdown a {
    outline: none;
}

.nav-dropdown a:focus {
    outline: none;
}

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

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

/* Dropdown Menu */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 0.5rem;
    display: none;
    z-index: 100;
}

.nav-dropdown li {
    margin: 0 !important;
    display: block;
}

.nav-dropdown li a {
    display: block;
    width: 100%;
}

/* CSS hover fallback */
.group:hover > .nav-dropdown {
    display: block;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Gallery Items */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(244, 63, 122, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Filter Buttons */
.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    background-color: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: white;
    font-size: 2rem;
    background-color: rgba(244, 63, 122, 0.9);
    border: none;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-primary);
}

.lightbox-close {
    top: 20px;
    right: 35px;
}

.lightbox-prev {
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile Menu */
.mobile-menu {
    transition: all 0.3s ease;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Header Scroll Effect */
#header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#header.scrolled #logo {
    height: 4rem;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem;
        font-size: 1.5rem;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        padding: 0.75rem;
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

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

/* Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Prose Styling (for text content) */
.prose {
    color: #4b5563;
    max-width: 65ch;
}

.prose strong {
    color: #1f2937;
    font-weight: 600;
}

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

.prose a:hover {
    color: var(--color-primary-dark);
}

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