/* =================================================================
   Nattu Sakkarai - Traditional Jaggery Website Styles
   ================================================================= */

/* Root Variables */
:root {
    /* Color Palette */
    --primary-color: #8B4513;        /* Saddle Brown - matches jaggery */
    --secondary-color: #D2691E;      /* Chocolate */
    --accent-color: #FFD700;         /* Gold */
    --cream-bg: #F5E6D3;             /* Cream background like header */
    --light-cream: #FAF3E9;
    --dark-brown: #654321;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    
    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-max-width: 1200px;
    
    /* Transitions */
    --transition-speed: 0.3s;
}

/* =================================================================
   Global Styles
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 85px; /* Compensate for fixed navbar height */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: var(--section-padding);
}

/* =================================================================
   Header Styles
   ================================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    background-color: var(--cream-bg);
}

.bg-cream {
    background-color: var(--cream-bg) !important;
}

.navbar-brand {
    padding: 0.5rem 0;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    position: relative;
    transition: color var(--transition-speed);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* =================================================================
   Hero Section
   ================================================================= */
.hero-section {
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--cream-bg) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../image/hero-pattern.png');
    background-size: cover;
    opacity: 0.1;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    border: none;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn-primary-custom:hover {
    background-color: var(--dark-brown);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 5px;
    background: transparent;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* =================================================================
   Section Styles
   ================================================================= */
.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 1rem auto;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   Card Styles
   ================================================================= */
.card-custom {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-custom img {
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.card-custom:hover img {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =================================================================
   Footer Styles
   ================================================================= */
.site-footer {
    background-color: #212529;
    color: #f8f9fa;
}

.footer-heading {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact li {
    color: #adb5bd;
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: var(--accent-color);
    width: 20px;
}

.footer-contact a {
    color: #adb5bd;
}

.footer-contact a:hover {
    color: var(--accent-color);
}

.social-links .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: all var(--transition-speed);
}

.social-links .social-icon:hover {
    background-color: var(--accent-color);
    color: var(--dark-brown);
    transform: translateY(-3px);
}

.footer-bottom .footer-link {
    color: #adb5bd;
    font-size: 0.9rem;
}

.footer-bottom .footer-link:hover {
    color: var(--accent-color);
}

/* =================================================================
   Back to Top Button
   ================================================================= */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-speed);
    z-index: 999;
}

.btn-back-to-top:hover {
    background-color: var(--dark-brown);
    transform: translateY(-5px);
}

.btn-back-to-top.show {
    display: flex;
}

/* =================================================================
   Form Styles
   ================================================================= */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.form-label {
    color: var(--text-dark);
    font-weight: 500;
}

/* =================================================================
   Gallery Styles
   ================================================================= */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 69, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* =================================================================
   Responsive Styles
   ================================================================= */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--light-cream);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 5px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .brand-name {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* =================================================================
   Utility Classes
   ================================================================= */
.bg-light-cream {
    background-color: var(--light-cream);
}

.text-primary-custom {
    color: var(--primary-color);
}

.text-secondary-custom {
    color: var(--secondary-color);
}

:root {
    --primary-color: #8B4513;
    --dark-brown: #5D4037;
    --light-cream: #FFF8E1;
    --accent-color: #FF9800;
    --secondary-color: #795548;
    --text-light: #757575;
    --gradient-primary: linear-gradient(135deg, #8B4513 0%, #5D4037 100%);
    --gradient-accent: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #FFF8E1 100%);
}

.traditional-process {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    position: relative;
    overflow: hidden;
}

.traditional-process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.03"><path fill="%238B4513" d="M500,200c-165,0-300,135-300,300s135,300,300,300s300-135,300-300S665,200,500,200z M500,650c-82.5,0-150-67.5-150-150s67.5-150,150-150s150,67.5,150,150S582.5,650,500,650z"/></svg>');
    z-index: 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.process-timeline {
    position: relative;
    padding: 2rem 0;
}

.process-card {
    position: relative;
    padding: 20px 15px;
    background: var(--gradient-card);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.process-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.2);
}

.process-card:hover::before {
    transform: scaleX(1);
}

.process-number {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
    transition: all 0.3s ease;
}

.process-card:hover .process-number {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.6);
}

.process-image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Makes it square (1:1 aspect ratio) */
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.process-card:hover .process-image-wrapper {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    transform: translateY(-5px);
}

.process-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(0.9);
}

.process-card:hover .process-image {
    transform: scale(1.1);
    filter: brightness(1);
}

.process-icon {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    z-index: 3;
}

.process-card:hover .process-icon {
    transform: translateX(-50%) translateY(-5px);
    background: var(--gradient-accent);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.5);
}

.process-icon i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.process-card:hover .process-icon i {
    transform: scale(1.2);
}

.process-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.process-card:hover .process-title {
    color: var(--accent-color);
}

.process-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    transition: all 0.3s ease;
}

.process-card:hover .process-description {
    color: var(--dark-brown);
}

/* Process Timeline Connector Line */
@media (min-width: 992px) {
    .process-timeline .row::before {
        content: '';
        position: absolute;
        top: 120px;
        left: 10%;
        right: 10%;
        height: 3px;
        background: linear-gradient(to right, 
            var(--accent-color) 0%, 
            var(--accent-color) 20%, 
            var(--secondary-color) 40%, 
            var(--secondary-color) 60%, 
            var(--accent-color) 80%, 
            var(--accent-color) 100%);
        z-index: 0;
        border-radius: 3px;
        box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
    }
    
    .process-timeline .row::after {
        content: '';
        position: absolute;
        top: 117px;
        left: 10%;
        right: 10%;
        height: 9px;
        background: transparent;
        border-top: 1px dashed rgba(139, 69, 19, 0.3);
        border-bottom: 1px dashed rgba(139, 69, 19, 0.3);
        z-index: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .process-image-wrapper {
        padding-bottom: 100%; /* Keep square aspect ratio */
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
        bottom: -20px;
    }
    
    .process-icon i {
        font-size: 1.2rem;
    }
    
    .process-title {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .process-image-wrapper {
        padding-bottom: 100%; /* Keep square aspect ratio */
    }
    
    .process-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* Animation for cards on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.process-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.process-card:nth-child(1) { animation-delay: 0.1s; }
.process-card:nth-child(2) { animation-delay: 0.2s; }
.process-card:nth-child(3) { animation-delay: 0.3s; }
.process-card:nth-child(4) { animation-delay: 0.4s; }
.process-card:nth-child(5) { animation-delay: 0.5s; }

/* =================================================================
   Image Fallback Styles
   ================================================================= */
img {
    background: linear-gradient(135deg, var(--cream-bg) 0%, var(--light-cream) 100%);
    border: 1px solid var(--secondary-color);
}

img[alt]::after {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    content: attr(alt);
    color: var(--primary-color);
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

/* Card images */
.card-img-top {
    min-height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Hero and preview images */
.hero-image img,
.img-fluid {
    min-height: 200px;
    object-fit: cover;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}
