/* Modern Design System - PadathuMappila Family */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Design Tokens */
:root {
    /* Colors */
    --primary-color: #c0a375;
    --primary-dark: #8b5c34;
    --secondary-color: #2c3e50;
    --secondary-dark: #1a252f;
    --accent-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #666;
    --text-white: #ffffff;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    
    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;
}

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

/* Global Responsive Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
    color: var(--text-light);
}

/* Container System */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Enhanced Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed !important;
    width: 100%;
    top: 0 !important;
    z-index: 1000 !important;
    transform: translateY(0) !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo {
    height: 40px;
    transition: transform var(--transition-normal);
}

.navbar-brand:hover .logo {
    transform: scale(1.05);
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--transition-normal);
    position: relative;
    padding: 5px 0;
}

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

.nav-link:hover {
    color: var(--primary-color);
}

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

/* Enhanced Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 10px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 25px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 30px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition-normal);
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Sections */
.hero-section {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 64px;
}

.hero-section:first-of-type {
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 52, 0.85) 0%, rgba(44, 62, 80, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 50px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-section.reverse .hero-content {
    flex-direction: row-reverse;
}

.hero-text {
    flex: 1;
    color: white;
}

.hero-text h1, .hero-text h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-md);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: white;
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: rgba(255, 255, 255, 0.95);
}

.hero-image {
    flex: 0 0 auto;
    width: 40%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-slow);
}

.hero-image:hover img {
    transform: scale(1.03);
}

/* Enhanced Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(192, 163, 117, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 163, 117, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Cards System */
.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--text-dark);
}

.card-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

/* Section Styles */
.section {
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    margin-bottom: var(--space-md);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

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

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

/* Content Pages */
.content-page {
    padding-top: 100px;
    min-height: 100vh;
    background-color: var(--bg-light);
}

.content-container {
    background-color: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-2xl);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    position: relative;
}

.content-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scroll Arrow */
.scroll-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Enhanced Footer */
.footer {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: var(--space-2xl) 0 var(--space-xl);
    color: white;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(70, 92, 46, 0.9);
    z-index: 1;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 4s ease infinite;
    z-index: 2;
}

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

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h3 {
    margin-bottom: var(--space-md);
    font-size: 1.3rem;
    color: #ffffff;
    font-family: var(--font-primary);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.social-icon {
    width: 50px;
    height: 50px;
    transition: transform var(--transition-normal);
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: none;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(192, 163, 117, 0.4);
    opacity: 0;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 30px rgba(192, 163, 117, 0.6);
}

.scroll-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeInUp 0.4s ease;
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 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: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 64px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: 20px 0;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background-color: var(--bg-light);
        margin-top: 10px;
        transform: none;
    }
    
    .hero-content {
        flex-direction: column !important;
        gap: var(--space-lg);
    }
    
    .hero-text, .hero-image {
        width: 100%;
        max-width: 100%;
    }
    
    .hero-image {
        margin-top: var(--space-md);
    }
    
    .hero-image img {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .content-container {
        padding: var(--space-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 480px) {
    .hero-text h1, .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 0.85rem;
    }
    
    .content-container {
        padding: var(--space-md);
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-image {
        width: 45%;
    }
    
    .container {
        padding: 0 30px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-image {
        max-width: 600px;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .scroll-to-top, .menu-toggle {
        display: none;
    }
    
    .content-page {
        padding-top: 0;
    }
    
    .content-container {
        box-shadow: none;
        padding: 0;
    }
}

/* 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 Styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

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