/* ===================================
   Custom Styles for Solar das Palmeiras
   =================================== */

/* Root Variables */
:root {
    --primary-color: #d97706;
    --primary-dark: #b45309;
    --primary-light: #fbbf24;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #fefce8;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Navigation Enhancements */
#navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
#home {
    min-height: 100vh;
    max-height: 1200px;
}

#home img {
    object-position: center;
}

@media (max-width: 768px) {
    #home {
        min-height: 100vh;
    }
}

@media (min-width: 1920px) {
    #home {
        max-height: 900px;
    }
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Hero Background Animation */
.hero-bg {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* Visible Animation Classes (triggered by JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Enhancements */
button, .btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* Form Enhancements */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

/* Scroll to Top Button */
#scroll-top {
    transition: all 0.3s ease;
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover {
    transform: translateY(-5px);
}

/* Section Spacing */
section {
    position: relative;
}

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(217, 119, 6, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Overlay Effects */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Custom Shadows */
.shadow-custom {
    box-shadow: 0 10px 40px rgba(217, 119, 6, 0.15);
}

.shadow-custom-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-custom-hover:hover {
    box-shadow: 0 20px 60px rgba(217, 119, 6, 0.25);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Divider */
.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    margin: 0 auto;
    border-radius: 2px;
}

/* Stats Counter */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Print Styles */
@media print {
    nav, footer, #scroll-top, #contact-form {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* Smooth Transitions */
a, button, input, textarea {
    transition: all 0.3s ease;
}

/* Hero Section Specific */
#home {
    min-height: 100vh;
}

/* WhatsApp Floating Button (Optional) */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Success/Error Messages */
.message-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===================================
   ENHANCED FEATURES - Premium Landing Page
   =================================== */

/* Glassmorphism Enhanced */
.glass-premium {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Gradient Animation for Hero Title */
@keyframes animate-gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: animate-gradient 3s ease infinite;
}

/* Slow Zoom Animation for Hero Background */
@keyframes slow-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.animate-slow-zoom {
    animation: slow-zoom 20s ease-in-out infinite alternate;
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-floating {
    animation: floating 3s ease-in-out infinite;
}

/* Section Transitions - Remove White Space */
section + section {
    margin-top: -1px;
}

/* Premium Card Hover */
.premium-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(217, 119, 6, 0.2);
}

/* Time Badge Animation */
.time-badge {
    position: relative;
    overflow: hidden;
}

.time-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.time-badge:hover::before {
    width: 300px;
    height: 300px;
}

/* Video Container Responsive */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Improved Mobile Responsiveness */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Dark Section Text Contrast */
.dark-section {
    color: rgba(255, 255, 255, 0.9);
}

.dark-section h2, .dark-section h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}