/* ============================================
   Mattakkara Village Website - Custom Styles
   ============================================ */

/* Root Variables */
:root {
    /* Primary Colors - Inspired by Kerala's Natural Beauty */
    --primary-color: #2d8659; /* Rich emerald green - nature, forests */
    --primary-dark: #1f5d3f; /* Deep forest green */
    --primary-light: #3da372; /* Fresh green */
    --accent-color: #d4a574; /* Warm golden/amber - sunsets, earth */
    --accent-dark: #b8935c; /* Deep golden */
    
    /* Secondary Colors */
    --secondary-color: #4a7c59; /* Muted green */
    --water-color: #4a90a4; /* River blue - Panagam River */
    --water-light: #6bb3c7; /* Light blue */
    
    /* Neutral Colors */
    --dark-color: #1a2e1f; /* Deep forest dark */
    --dark-secondary: #2d3e32; /* Soft dark green */
    --light-color: #f5f7f6; /* Soft green-tinted white */
    --text-color: #2d3e32; /* Dark green for text */
    --text-light: #5a6b5f; /* Muted text */
    
    /* Status Colors */
    --success-color: #2d8659;
    --info-color: #4a90a4;
    --warning-color: #d4a574;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    margin-bottom: 2rem;
}

/* Navigation */
.navbar {
    background: rgba(26, 46, 31, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #2d8659 0%, #4a90a4 50%, #d4a574 100%);
    background-image: 
        linear-gradient(135deg, rgba(45, 134, 89, 0.75) 0%, rgba(74, 144, 164, 0.75) 50%, rgba(212, 165, 116, 0.6) 100%),
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 134, 89, 0.6) 0%, rgba(74, 144, 164, 0.6) 50%, rgba(212, 165, 116, 0.5) 100%);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s both;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator i {
    font-size: 2rem;
    color: white;
}

/* Section Spacing */
section {
    padding: 80px 0;
}

/* About Section */
.about-content {
    padding: 2rem 0;
}

.about-image img {
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);
}

.feature-box {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.feature-box:hover {
    background: linear-gradient(135deg, var(--light-color), rgba(212, 165, 116, 0.1));
    transform: translateY(-5px);
}

.feature-box i {
    color: var(--primary-color);
}

/* Attractions Section */
.attraction-card {
    transition: var(--transition);
    border-radius: 15px;
    overflow: hidden;
}

.attraction-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-img-wrapper {
    overflow: hidden;
    height: 250px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.attraction-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

/* Education Section */
.education-card {
    transition: var(--transition);
    background: white;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #ffffff 0%, var(--light-color) 100%);
}

.education-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(45, 134, 89, 0.15) !important;
    background: linear-gradient(135deg, #ffffff 0%, rgba(45, 134, 89, 0.05) 100%);
}

/* Gallery Section */
.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item img {
    transition: var(--transition);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact-item {
    padding: 2rem;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    display: block;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.4);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* Back to Top Button */
#backToTop {
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
    transition: var(--transition);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color) !important;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-img-wrapper {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Loading Optimization */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Additional Color Enhancements */
.bg-light {
    background-color: var(--light-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Card Enhancements */
.attraction-card .card-title i,
.education-card i {
    color: var(--primary-color);
}

/* Contact Section Icons */
.contact-item i {
    color: var(--accent-color);
}

/* List Items */
.list-group-item i {
    color: var(--primary-color);
}

.list-group-item {
    color: var(--text-color);
}

/* Success/Check Icons */
.text-success {
    color: var(--primary-color) !important;
}

/* Section Backgrounds */
section.bg-light {
    background: linear-gradient(135deg, var(--light-color) 0%, rgba(212, 165, 116, 0.05) 100%) !important;
}

/* Card Body Text */
.card-body {
    color: var(--text-color);
}

.card-text {
    color: var(--text-light);
}

/* Enhanced Gradient for Hero */
.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Navbar Brand Enhancement */
.navbar-brand {
    color: var(--accent-color) !important;
}

.navbar-brand:hover {
    color: #e6c99a !important;
}

/* Print Styles */
@media print {
    .navbar,
    #backToTop,
    footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

