/* R&B Espaços Verdes - Custom Styles
   Premium Landscaping Website
   ========================================== */

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --color-forest: #2D5016;
    --color-forest-light: #3D6B1F;
    --color-forest-dark: #1E3A0E;
    --color-gold: #D4AF37;
    --color-gold-light: #E5C85C;
    --color-gold-dark: #B8941E;
    --color-green-light: #8FBC8F;
    --color-green-sage: #A8C9A8;
    --color-bg: #FAFAF8;
    --color-bg-warm: #F5F3EE;
    --color-text: #1A1A1A;
    --color-text-light: #4A4A4A;
    --color-text-muted: #6B6B6B;
    --color-white: #FFFFFF;
    --color-border: #E5E5E0;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-gold: 0 4px 14px rgba(212, 175, 55, 0.25);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* =============================================
   BASE STYLES
   ============================================= */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

/* =============================================
   PREMIUM COMPONENTS
   ============================================= */

/* Gold Accent Divider */
.gold-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    border-radius: 2px;
}

.gold-divider-center {
    margin-left: auto;
    margin-right: auto;
}

/* Premium Card */
.premium-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
    overflow: hidden;
}

.premium-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--color-gold);
}

/* Premium Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--color-forest);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    letter-spacing: 0.025em;
}

.btn-primary:hover {
    background: var(--color-forest-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    color: var(--color-forest-dark);
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    letter-spacing: 0.025em;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-forest);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-forest);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-white);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 14, 0.85) 0%,
        rgba(45, 80, 22, 0.7) 50%,
        rgba(45, 80, 22, 0.5) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all var(--transition-base);
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.nav-scrolled .nav-link {
    color: var(--color-text) !important;
}

.nav-scrolled .nav-logo-text {
    color: var(--color-forest) !important;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width var(--transition-base);
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-white);
    z-index: 100;
    transition: right var(--transition-slow);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 240px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    padding: 0.5rem;
    z-index: 60;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
    font-size: 0.9375rem;
}

.dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-forest);
    padding-left: 1.25rem;
}

/* =============================================
   SECTIONS
   ============================================= */
.section-padding {
    padding: 5rem 0;
}

.section-padding-lg {
    padding: 7rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 640px;
    line-height: 1.8;
}

/* =============================================
   STAT COUNTER
   ============================================= */
.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1;
}

/* =============================================
   TESTIMONIAL CARD
   ============================================= */
.testimonial-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: var(--color-gold);
    opacity: 0.3;
    font-family: var(--font-heading);
    line-height: 1;
}

/* =============================================
   BEFORE/AFTER SLIDER
   ============================================= */
.ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: ew-resize;
    user-select: none;
}

.ba-slider img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.ba-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    max-width: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--color-gold);
    transform: translateX(-50%);
    z-index: 3;
}

.ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--color-gold);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.ba-label {
    position: absolute;
    bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.ba-label-before { left: 1rem; }
.ba-label-after { right: 1rem; }

/* =============================================
   PORTFOLIO FILTER
   ============================================= */
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-forest);
    color: var(--color-white);
    border-color: var(--color-forest);
}

/* =============================================
   FORM STYLES
   ============================================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-forest);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    display: none;
}

.form-error.visible {
    display: block;
}

/* =============================================
   WHATSAPP FLOATING BUTTON
   ============================================= */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: all var(--transition-base);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* =============================================
   BREADCRUMBS
   ============================================= */
.breadcrumbs {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-forest);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-gold);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--color-border);
}

/* =============================================
   PAGE HERO (Inner pages)
   ============================================= */
.page-hero {
    position: relative;
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--color-forest-dark), var(--color-forest));
    color: var(--color-white);
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* =============================================
   FOOTER
   ============================================= */
.footer-gradient {
    background: linear-gradient(180deg, var(--color-forest-dark) 0%, #0F1F08 100%);
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* =============================================
   RESPONSIVE UTILITIES
   ============================================= */
@media (max-width: 768px) {
    .section-padding { padding: 3rem 0; }
    .section-padding-lg { padding: 4rem 0; }
    .hero-section { min-height: 80vh; }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .nav-fixed, .whatsapp-float, .mobile-menu, .mobile-menu-overlay { display: none !important; }
    body { background: white; }
    .hero-section { min-height: auto; padding: 2rem 0; }
}
