/* ========================================
   MELYOS GROUP - MAIN STYLES
   ======================================== */

/* CSS Variables / Design Tokens */
:root {
    /* Colors */
    --primary: #B8862B;
    --primary-light: #DBAA66;
    --primary-dark: #8B6622;
    --black: #000000;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --text-gray: #4A4A4A;
    --dark-overlay: rgba(0, 0, 0, 0.5);
    --dark-overlay-heavy: rgba(0, 0, 0, 0.7);
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Utilities */
.heading-xl {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.heading-lg {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
}

.heading-md {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.4;
}

.heading-sm {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.4;
}

.body-lg {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    line-height: 1.6;
}

.body-md {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.6;
}

.body-sm {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: 1200px;
}

/* Section Spacing */
.section {
    padding: var(--spacing-xl) 0;
}

.section-sm {
    padding: var(--spacing-lg) 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: #A67C28;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-outline:hover {
    background-color: var(--black);
    color: var(--white);
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.card-content {
    padding: var(--spacing-md);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

.badge-primary {
    background-color: var(--primary);
    color: var(--white);
}

.badge-success {
    background-color: #10b981;
    color: var(--white);
}

.badge-danger {
    background-color: #ef4444;
    color: var(--white);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.text-primary {
    color: var(--primary);
}

.bg-light {
    background-color: var(--light-gray);
}

.bg-dark {
    background-color: var(--black);
    color: var(--white);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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);
    }
}

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

/* Responsive */
/* Tablet */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large (Tablet Portrait) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-sm {
        padding: 2rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .badge {
        padding: 0.375rem 0.875rem;
        font-size: 0.6875rem;
    }
    
    /* Typography adjustments */
    .heading-xl {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
    
    .heading-lg {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }
    
    .heading-md {
        font-size: clamp(1.5rem, 4vw, 1.875rem);
    }
    
    .heading-sm {
        font-size: clamp(1.125rem, 3vw, 1.375rem);
    }
    
    .body-lg {
        font-size: clamp(1rem, 2vw, 1.125rem);
    }
}

/* Mobile Standard */
@media (max-width: 480px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
    }
    
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .section-sm {
        padding: 1.5rem 0;
    }
    
    .grid {
        gap: 0.875rem;
    }
    
    .heading-xl {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .heading-lg {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .heading-md {
        font-size: 1.375rem;
        line-height: 1.3;
    }
    
    .heading-sm {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .body-lg {
        font-size: 1rem;
    }
    
    .body-md {
        font-size: 0.9375rem;
    }
    
    .body-sm {
        font-size: 0.8125rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        gap: 0.375rem;
    }
    
    .card {
        border-radius: 10px;
    }
    
    .card-image {
        height: 200px;
    }
    
    .card-content {
        padding: 0.875rem;
    }
    
    .badge {
        padding: 0.3125rem 0.75rem;
        font-size: 0.625rem;
    }
    
    /* Spacing utilities */
    .mt-sm { margin-top: 0.75rem; }
    .mt-md { margin-top: 1.25rem; }
    .mt-lg { margin-top: 2rem; }
    .mb-sm { margin-bottom: 0.75rem; }
    .mb-md { margin-bottom: 1.25rem; }
    .mb-lg { margin-bottom: 2rem; }
}

/* Mobile Very Small */
@media (max-width: 375px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 0.875rem;
    }
    
    .heading-xl {
        font-size: 1.5rem;
    }
    
    .heading-lg {
        font-size: 1.375rem;
    }
    
    .heading-md {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .card-image {
        height: 180px;
    }
}

/* Loader Styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 300px;
}

.loader-spinner {
    border: 4px solid rgba(184, 134, 43, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-sm {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.loader-md {
    width: 50px;
    height: 50px;
}

.loader-lg {
    width: 70px;
    height: 70px;
    border-width: 5px;
}

.loader-text {
    margin-top: var(--spacing-md);
    color: var(--primary);
    font-weight: 500;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Container Styles */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 300px;
    text-align: center;
}

.error-icon {
    width: 60px;
    height: 60px;
    color: #ef4444;
    margin-bottom: var(--spacing-md);
}

.error-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--spacing-sm);
}

.error-message {
    color: #666;
    margin-bottom: var(--spacing-md);
    max-width: 500px;
}

.error-retry {
    margin-top: var(--spacing-sm);
}

/* Fullpage Loader */
.loader-fullpage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Section Loader */
.section-loader {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Component styles are loaded separately via link tags in HTML */