/**
 * ATTIREDOM BASE THEME
 * Single source of truth for colors, fonts, and base styles
 * Loaded in header.php BEFORE page-specific styles
 * 
 * PHASE 2: Theme Consistency Fix
 * Royal Burgundy Theme - Professional & Elegant
 */

/* ============================================================================
   CSS VARIABLES - ONE SOURCE OF TRUTH
   ============================================================================ */

:root {
    /* PRIMARY COLORS - Royal Burgundy Theme */
    --royal-burgundy: #4A0E1A;
    --dark-burgundy: #2B1518;
    --darker-brown: #1A0B0F;
    --matte-black: #0E0E0E;
    
    /* SECONDARY COLORS */
    --antique-gold: #C6A75E;
    --cream-light: #F5F1E8;
    --text-muted: #A0A0A0;
    
    /* CARD BACKGROUNDS */
    --card-dark: #3A3A3A;
    --card-darker: #2D2D2D;
    --card-light: rgba(58, 58, 58, 0.8);
    
    /* TYPOGRAPHY */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    
    /* SPACING */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* BORDERS */
    --border-radius: 0; /* Sharp edges for royal theme */
    --border-color: rgba(198, 167, 94, 0.2);
    --border-color-hover: var(--antique-gold);
    
    /* SHADOWS */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 8px 30px rgba(198, 167, 94, 0.3);
    
    /* TRANSITIONS */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================================
   GLOBAL RESETS & BASE STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--darker-brown) 0%, var(--dark-burgundy) 100%);
    color: var(--cream-light);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================================
   TYPOGRAPHY BASE
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--cream-light);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
}

a {
    color: var(--antique-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--cream-light);
}

/* ============================================================================
   BUTTON BASE STYLES
   ============================================================================ */

.btn,
button[type="submit"],
button[type="button"],
.button,
input[type="submit"] {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--antique-gold);
    color: var(--antique-gold);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: var(--border-radius);
    min-height: 44px; /* Touch-friendly */
}

.btn:hover,
button[type="submit"]:hover,
button[type="button"]:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--antique-gold);
    color: #000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn:active {
    transform: translateY(0);
}

/* Button Variants */
.btn-primary {
    background: transparent;
    border: 1px solid var(--antique-gold);
    color: var(--antique-gold);
}

.btn-primary:hover {
    background: var(--antique-gold);
    color: #000;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--cream-light);
}

.btn-secondary:hover {
    border-color: var(--antique-gold);
    color: var(--antique-gold);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================================================
   FORM BASE STYLES
   ============================================================================ */

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--cream-light);
    font-family: var(--font-sans);
    font-size: 1rem; /* Prevents iOS zoom on focus */
    transition: all var(--transition-fast);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--antique-gold);
    background: rgba(0, 0, 0, 0.4);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
}

select option {
    background: var(--card-dark);
    color: var(--cream-light);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--cream-light);
    font-weight: 500;
}

/* ============================================================================
   CARD BASE STYLES
   ============================================================================ */

.card {
    background: var(--card-dark);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(198, 167, 94, 0.3);
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--antique-gold); }
.text-cream { color: var(--cream-light); }
.text-muted { color: var(--text-muted); }

.bg-dark { background: var(--card-dark); }
.bg-darker { background: var(--card-darker); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

/* ============================================================================
   ALERTS & NOTIFICATIONS
   ============================================================================ */

.alert {
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-left: 4px solid;
    background: var(--card-dark);
}

.alert-success {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.alert-error {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.alert-warning {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.alert-info {
    border-left-color: var(--antique-gold);
    background: rgba(198, 167, 94, 0.1);
    color: var(--antique-gold);
}

/* ============================================================================
   LOADING & TRANSITIONS
   ============================================================================ */

.fade-in {
    animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   RESPONSIVE HELPERS
   ============================================================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}