:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin-right: calc(-1 * (100vw - 100%));
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('https://images.pexels.com/photos/1640777/pexels-photo-1640777.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&fit=crop') center/cover;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
}

.stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    margin: 1rem 0;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
}

.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.recipe-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover img {
    transform: scale(1.1);
}

.recipe-card-body {
    padding: 1.5rem;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.recipe-rating {
    color: #ffc107;
}

.category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.8), rgba(247, 147, 30, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.feature-item {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.testimonial-section {
    background: var(--gradient-dark);
    color: white;
}

.testimonial-card {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 20px;
    margin: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 1rem;
}

.newsletter-section {
    background: var(--gradient-primary);
    color: white;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    border-radius: 50px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-color);
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.blog-image {
    position: relative;
    overflow: hidden;
    flex: 0 0 250px;
    height: 250px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.feature-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.feature-icon-circle i {
    color: var(--primary-color);
}

.app-buttons .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.app-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.loading {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-content h4 {
    flex: 0;
}

.blog-content p {
    flex: 1;
    margin-bottom: 0;
}

.blog-content .btn {
    align-self: flex-start;
    margin-top: 1rem;
}

/* Media Queries */
@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .search-box input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .recipe-card-body, .blog-content {
        padding: 1rem;
    }
    
    .recipe-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .recipe-meta span {
        font-size: 0.8rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .btn-primary-custom {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer .col-lg-4, .footer .col-lg-3, .footer .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    .newsletter-input {
        padding: 0.8rem 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .hero {
        background-attachment: scroll;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .recipe-card-body, .blog-content {
        padding: 1.2rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-height: 576px) and (orientation: landscape) {
    .hero {
        min-height: 120vh;
    }
    
    .hero-content {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 375px) {
    .navbar-nav .nav-link {
        margin: 0 0.2rem;
        font-size: 0.9rem;
    }
    
    .btn-primary-custom {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .recipe-card img, .blog-image img {
        height: 180px;
    }
}

@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .recipe-card img, .blog-image img {
        height: 150px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .recipe-card img, .blog-image img {
        height: 300px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 767.98px) {
    .carousel-control-prev, .carousel-control-next {
        display: none;
    }
    
    .testimonial-card {
        margin: 0.5rem;
    }
}

@media (max-width: 767px) {
    input, select, textarea {
        font-size: 16px;
    }
}

/* Blog Card Layout Fixes */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem !important;
}

.blog-content h4 {
    margin-bottom: 1rem;
}

.blog-content p.text-muted {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.blog-content .btn {
    width: fit-content;
    margin-top: auto;
}

.blog-image {
    height: 250px;
}

.blog-image img {
    height: 100%;
    object-fit: cover;
}
