/*
 * Main Stylesheet
 * Florelie Website
 *
 * Imports all CSS modules in the correct order
 */

/* ========================================
   CSS IMPORTS
   ======================================== */

/* 1. Reset - Clear browser defaults */
@import 'reset.css';

/* 2. Variables - Design tokens */
@import 'variables.css';

/* 3. Typography - Fonts and text styles */
@import 'typography.css';

/* 4. Components - Reusable UI elements */
@import 'components.css';

/* 5. Layout - Grid systems and page structure */
@import 'layout.css';

/* ========================================
   BASE STYLES
   ======================================== */

body {
  background: var(--color-gray-whisper);
  padding-top: 68px; /* Height of fixed header */
}

/* Ensure footer stays at bottom */
#root,
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  margin-top: -10px; 
  
}

/* ========================================
   ALTERNATING SECTION BACKGROUNDS
   ======================================== */

/* Automatically alternate section backgrounds */
main > .section:nth-child(odd) {
  background: var(--color-white);
}

main > .section:nth-child(even) {
  background: var(--color-gray-whisper);
}

/* Override with specific background classes */
.section.section-white {
  background: var(--color-white);
}

.section.section-gray {
  background: var(--color-gray-whisper);
}

.section.section-purple {
  background: var(--color-sage-pale);
}

.section.section-pink {
  background: var(--color-sage-secondary-pale);
}

/* ========================================
   PAGE-SPECIFIC STYLES
   ======================================== */

/* Contact Section Enhancements */
#contact {
  background: var(--color-sage-secondary-pale);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.contact-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--color-sage-dark);
  margin-top: 2px;
}

.contact-item-content h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
}

.contact-item-content p,
.contact-item-content a {
  color: var(--color-gray-medium);
  font-size: var(--text-base);
}

.contact-item-content a:hover {
  color: var(--color-sage-dark);
}

/* Philosophy Quote Section */
#philosophy {
  background: var(--color-white);
  padding: var(--space-5xl) 0;
}

/* Services Cards Enhancement */
.service-card {
  text-align: center;
}

.service-card .card-image-wrapper {
  margin-bottom: var(--space-lg);
}

/* Workshop Card Specific */
.workshop-card .date-badge {
  display: inline-block;
}

/* ========================================
   WORDPRESS GALLERY
   ======================================== */

.wp-block-gallery .wp-block-image {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.wp-block-gallery .wp-block-image img {
  transition: transform var(--transition-base);
}

.wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.03);
}

.wp-block-gallery figcaption {
  font-size: var(--text-sm);
  color: var(--color-gray-medium);
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-sage-pale);
  border-top-color: var(--color-sage-dark);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* Image placeholder while loading */
.img-placeholder {
  background: linear-gradient(90deg, var(--color-gray-pale) 0%, var(--color-gray-whisper) 50%, var(--color-gray-pale) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .header,
  .footer,
  .btn,
  .social-icons,
  .hamburger {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
    padding-top: 0;
  }

  .section {
    page-break-inside: avoid;
    padding: 1cm 0;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.border-radius {
  border-radius: var(--radius-md);
}

.overflow-hidden {
  overflow: hidden;
}

/* ========================================
   CUSTOM SCROLLBAR (Webkit browsers)
   ======================================== */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-pale);
}

::-webkit-scrollbar-thumb {
  background: var(--color-sage-light);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-sage-medium);
}

/* ========================================
   SELECTION STYLES
   ======================================== */

::selection {
  background: var(--color-sage-pale);
  color: var(--color-sage-dark);
}

::-moz-selection {
  background: var(--color-sage-pale);
  color: var(--color-sage-dark);
}
