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

:root {
    --primary-black: #000000;
    --royal-purple: #663399;
    --deep-purple: #4a1a5c;
    --silver: #c0c0c0;
    --light-silver: #e8e8e8;
    --white: #ffffff;
    --gold-accent: #d4af37;
    
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
    
    --shadow-luxury: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-elegant: 0 5px 20px rgba(102, 51, 153, 0.2);
    --gradient-purple: linear-gradient(135deg, var(--royal-purple), var(--deep-purple));
    --gradient-silver: linear-gradient(135deg, var(--silver), var(--light-silver));
}

body {
    font-family: 'Inter', sans-serif; /* Fallback for Safari */
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: #000000; /* Fallback for Safari */
    color: var(--primary-black);
    background-color: #ffffff; /* Fallback for Safari */
    background-color: var(--white);
    /* Safari-specific fixes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif; /* Fallback for Safari */
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    /* Safari text rendering optimization */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Smooth scrolling with Safari fallback */
html {
    scroll-behavior: smooth;
}

/* Safari-specific smooth scrolling fallback */
@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}

/* Safari-specific webkit scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8941f;
}

/* Loading animation */
body.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Utility classes */
.text-center {
    text-align: center;
}

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

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

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

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

/* Default section headers - white text for dark backgrounds */
.section-header h2,
section > h2:not(.hero h1):not(.hero-title),
.services .section-header h2,
.faq .faq-content h2,
.nutrition-header h2,
.elite-header h2,
.contact h2 {
    font-family: 'Playfair Display', serif; /* Fallback for Safari */
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff; /* Fallback for Safari */
    color: var(--white) !important;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-header p,
section .section-header p:not(.hero p):not(.hero-subtitle) {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Light background sections - gold text */
.about-team .section-header h2,
.about-team h2,
.about-content h2 {
    color: #d4af37; /* Fallback for Safari */
    color: var(--gold-accent) !important;
}

.about-team .section-header p,
.about-team p,
.about-content p {
    color: #000000; /* Fallback for Safari */
    color: var(--primary-black) !important;
}

/* Hero section - preserve existing gradient styling */
/* Hero section styles are handled in hero.css - no overrides needed */

/* Elite section - maintain gold accent for crown */
.elite-package .section-header h2 {
    color: #ffffff; /* Fallback for Safari */
    color: var(--white);
}

.elite-package .crown-icon {
    color: #d4af37; /* Fallback for Safari */
    color: var(--gold-accent);
}

/* FAQ section - gold for questions */
.faq h2 {
    color: #ffffff; /* Fallback for Safari */
    color: var(--white);
}

.faq .faq-item h3 {
    color: #d4af37; /* Fallback for Safari */
    color: var(--gold-accent);
}

/* Contact section - white headers */
.contact h2,
.contact h3 {
    color: #ffffff; /* Fallback for Safari */
    color: var(--white);
}

/* Responsive section headers */
@media (max-width: 768px) {
    .section-header h2,
    section h2 {
        font-size: 2.5rem;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .section-header h2,
    section h2 {
        font-size: 2rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
}

/* Button base styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif; /* Fallback for Safari */
    font-family: var(--font-secondary);
}

.btn-primary {
    background: linear-gradient(135deg, #663399, #4a1a5c); /* Fallback for Safari */
    background: var(--gradient-purple);
    color: #ffffff; /* Fallback for Safari */
    color: var(--white);
    box-shadow: 0 5px 20px rgba(102, 51, 153, 0.2);
    box-shadow: var(--shadow-elegant);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 51, 153, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8); /* Fallback for Safari */
    background: var(--gradient-silver);
    color: #000000; /* Fallback for Safari */
    color: var(--primary-black);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-luxury);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Section spacing */
section {
    padding: 4rem 0;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #d4af37; /* Fallback for Safari */
    outline: 2px solid var(--gold-accent);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background: #d4af37; /* Fallback for Safari */
    background: var(--gold-accent);
    color: #000000; /* Fallback for Safari */
    color: var(--primary-black);
}
