/* Custom CSS for Claire Stennett Piano Teacher Website */

/* CSS Variables for consistent theming */
:root {
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --secondary-blue: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Custom gradients */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
}

.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%);
}

.contact-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%);
}

/* Header enhancements */
.header-blur {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    transition: width 0.3s ease;
}

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

/* Mobile menu */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.mobile-menu.active {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
}

/* Ensure mobile menu is properly hidden by default */
.mobile-menu:not(.active) {
    max-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Piano card animation */
.piano-card {
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.piano-card:hover {
    transform: rotate(0deg);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced hover effects for primary buttons with Tailwind classes */
.btn-primary.bg-blue-600:hover,
.bg-blue-600.btn-primary:hover,
a.bg-blue-600:hover,
button.bg-blue-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Enhanced hover effects for secondary buttons with Tailwind classes */
.btn-secondary.border-blue-600:hover,
.border-blue-600.btn-secondary:hover,
a.border-blue-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effects */
.lesson-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.lesson-card:hover {
    transform: translateY(-5px);
}

.testimonial-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

/* Form styles */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-blue);
    border-color: transparent;
}

/* Widget placeholders */
#booking-widget, #contact-widget {
    transition: all 0.3s ease;
}

#booking-widget:hover, #contact-widget:hover {
    background: #dbeafe;
    border-color: var(--primary-blue);
}

/* Scroll animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Star rating styles */
.star-rating svg {
    transition: fill 0.2s ease;
}

.star-rating svg:hover {
    fill: #fbbf24;
}

/* Logo animation */
.logo-icon {
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.1);
}

/* Footer styles */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Footer logo hover effect */
.footer-logo {
    transition: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 2.5rem;
    }
    
    .piano-card {
        transform: rotate(0deg);
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .responsive-image-container {
        aspect-ratio: auto;
        min-height: 0;
        padding: 0;
    }
    .responsive-image-container img {
        display: block;
        margin: 0 auto;
        height: auto;
        max-width: 100%;
    }
    #waitlist-widget {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 640px) {
    .hero-gradient h1 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Print styles */
@media print {
    .header,
    .mobile-menu,
    button,
    #booking-widget,
    #contact-widget {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }
    
    h1, h2, h3 {
        color: black;
        page-break-after: avoid;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .gradient-bg {
        background: #000;
    }
    
    .hero-gradient,
    .contact-gradient {
        background: #fff;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --bg-light: #1f2937;
    }
}

/* Responsive image container for hero/feature images */
.responsive-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #eee;
}

.responsive-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 768px) {
  .responsive-image-container {
    aspect-ratio: auto;
    min-height: 0;
    padding: 0;
  }
  .responsive-image-container img {
    display: block;
    margin: 0 auto;
    height: auto;
    max-width: 100%;
  }
}

.custom-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.custom-list li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 0.4em;
  text-indent: 0;
  color: inherit;
}
.custom-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: inherit;
  font-size: 1.1em;
  line-height: 1;
}

/* Disable right-click and text selection on media */
.no-right-click {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.no-right-click img,
.no-right-click video {
  pointer-events: none;
}

/* Additional protection for media elements */
.protected-media {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Universal CTA button hover effects */
/* Primary blue buttons */
a[href*="contact"].bg-blue-600:hover,
a[href*="contact"].btn-primary:hover,
button.bg-blue-600:hover,
.bg-blue-600.text-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Secondary outline buttons */
a[href*="lessons"].border-blue-600:hover,
a[href*="about"].border-blue-600:hover,
a[href*="testimonials"].border-blue-600:hover,
.border-blue-600.text-blue-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

/* White buttons on blue backgrounds */
.bg-white.text-blue-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Performance thumbnails mobile optimization */
@media (max-width: 640px) {
    .event-content:not([style*="display: none"]) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .event-content img,
    .event-content video,
    .video-thumb {
        height: 12rem !important;
        min-height: 12rem !important;
    }
    
    /* Ensure thumbnails are visible on mobile */
    .performance-thumb,
    .video-thumb {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Force grid layout on mobile for collapsed sections */
@media (max-width: 640px) {
    .event-content[style*="display: grid"] {
        display: grid !important;
    }
}

/* Admin Hub Styles */
.admin-section {
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.admin-links {
    display: flex;
    gap: 1em;
    margin-bottom: 2em;
}
.admin-btn {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: #2d6cdf;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}
.admin-btn:hover {
    background: #1a4fa0;
}
#admin-status ul {
    list-style: none;
    padding: 0;
}
#admin-status li {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}
#admin-status span {
    font-weight: bold;
}

#deploy-status {
    background: #181818;
    color: #b6ff7a; /* greenish */
    font-family: "Fira Mono", "Consolas", "Menlo", "Monaco", monospace;
    font-size: 1em;
    padding: 1em;
    border-radius: 6px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid #333;
}

#deploy-status .warn, #deploy-status .error {
    color: #ffe066; /* yellow for warnings/errors */
}

#deploy-progress-bar-inner {
    background: #2196f3; /* blue */
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}
#deploy-progress-files, #deploy-progress-mb {
    color: #222;
    font-weight: bold;
    font-family: "Fira Mono", "Consolas", "Menlo", "Monaco", monospace;
}

.primary-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.75em 2em;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.primary-btn:hover {
    background: #1251a3;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}
.primary-btn:disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7;
}
.danger-btn {
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.75em 2em;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.danger-btn:hover {
    background: #a31515;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}
.danger-btn:disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7;
}

/* Gallery styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-overlay-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
    color: white;
}

.gallery-item:hover .gallery-overlay-content {
    opacity: 1;
    transform: translateY(0);
}

/* Modal styles */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.modal-nav-btn svg {
    display: block;
    margin: auto;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.prev {
    left: 1rem;
}

.modal-nav-btn.next {
    right: 1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Prevent image download */
.no-download {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.no-download img {
    pointer-events: none;
}

/* Gallery responsive design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    /* Hide modal completely on mobile */
    .image-modal {
        display: none !important;
    }
    
    /* Hide gallery overlay on mobile */
    .gallery-overlay {
        display: none !important;
    }
    
    .modal-nav-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .modal-nav-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .modal-close {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    /* Hide modal completely on mobile */
    .image-modal {
        display: none !important;
    }
    
    /* Hide gallery overlay on mobile */
    .gallery-overlay {
        display: none !important;
    }
    
    .modal-content {
        max-width: 95vw;
    }
    
    .modal-info {
        padding: 0.75rem;
    }
    
    .modal-info h3 {
        font-size: 1rem;
    }
    
    .modal-info p {
        font-size: 0.875rem;
    }
}