/* ChocolateFlow - Hot Chocolate Dispenser Website CSS */

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

/* Tablet and below: keep cards centered and constrained */
@media (max-width: 768px) {
    .floating-feature,
    .blog-card,
    .product-circle,
    .about-card,
    .review,
    .contact-method,
    .contact-form-section,
    .experience-card {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    .floating-features-grid,
    .blog-grid,
    .products-circular-grid {
        justify-items: center;
    }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card { width: 100%; max-width: 90%; justify-self: center; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c2c2c;
    background: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

nav .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

nav li {
    margin: 0;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

nav a:hover,
nav a[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Ensure mobile menu button is hidden on desktop */
@media (min-width: 769px) {
    nav .mobile-menu-btn { display: none !important; }
    nav ul { display: flex !important; }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    margin-top: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #CD853F 100%);
    color: #fff;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero::after {
    /* Disabled to avoid a visible white seam between hero and next section */
    display: none;
    height: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 228, 181, 0.2);
    color: #FFE4B5;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 228, 181, 0.3);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(45deg, #fff, #FFE4B5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.5;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image {
    text-align: center;
    animation: fadeInRight 1s ease-out 0.6s both;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(139, 69, 19, 0.3));
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #FFE4B5;
    color: #8B4513;
    box-shadow: 0 4px 20px rgba(255, 228, 181, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 228, 181, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #8B4513;
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

/* Floating Features Section */
.floating-features {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.floating-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q600,60 1200,0 L1200,120 L0,120 Z" fill="white"/></svg>') no-repeat;
    background-size: cover;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-header h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #8B4513;
    margin-bottom: 1rem;
}

.features-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.floating-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.floating-feature {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B4513, #CD853F);
}

.floating-feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(139, 69, 19, 0.15);
}

.feature-float-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.floating-feature h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #8B4513;
    font-weight: 700;
}

.floating-feature p {
    color: #666;
    line-height: 1.6;
}

/* Wave Showcase Section */
.wave-showcase {
    padding: 8rem 0;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.wave-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><path d="M0,400 Q300,200 600,400 T1200,400 L1200,800 L0,800 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat;
    background-size: cover;
    animation: waveFloat 6s ease-in-out infinite;
}

@keyframes waveFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Showcase ordering: mobile - text top, image bottom; desktop - image left, text right */
.showcase-text { order: 1; }
.showcase-visual { order: 2; }
@media (min-width: 992px) {
    .showcase-visual { order: 1; }
    .showcase-text { order: 2; }
}

.showcase-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.showcase-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.showcase-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #FFE4B5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-size: 1.5rem;
}

.stat-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.showcase-visual {
    text-align: center;
}

.showcase-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Circular Products Section */
.circular-products {
    padding: 8rem 0;
    background: #fff;
    text-align: center;
}

.circular-products h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #8B4513;
    margin-bottom: 1rem;
}

.circular-products p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.products-circular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.product-circle-link {
    text-decoration: none;
    color: inherit;
}

.product-circle {
    background: #fff;
    border-radius: 50%;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px rgba(139, 69, 19, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 0; /* allow the image to fully occupy the circle */
}

.product-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent, rgba(139, 69, 19, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Bottom gradient for text readability */
.product-circle::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    border-radius: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
    z-index: 1;
    pointer-events: none;
}

.product-circle:hover::before {
    opacity: 1;
}

.product-circle:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 70px rgba(139, 69, 19, 0.2);
}

.product-circle.featured {
    border: 3px solid #FFE4B5;
    box-shadow: 0 15px 50px rgba(255, 228, 181, 0.3);
}

.product-circle img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the entire circle */
    border-radius: 50%;
    display: block;
    margin: 0;
    z-index: 0;
}

/* Responsive adjustments for larger product circles */
@media (max-width: 992px) {
    .product-circle { width: 360px; height: 360px; }
    .product-circle img { width: 100%; height: 100%; object-fit: cover; }
}
@media (max-width: 768px) {
    .product-circle { width: 320px; height: 320px; }
    .product-circle img { width: 100%; height: 100%; object-fit: cover; }
}
@media (max-width: 480px) {
    .product-circle { width: 250px; height: 250px; }
    .product-circle img { width: 100%; height: 100%; object-fit: cover; }
}

.product-circle h3 {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 62px;
    z-index: 2;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    margin: 0;
}

.product-circle .price {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 36px;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 800;
    color: #FFE4B5;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    margin: 0;
}

.product-circle .rating {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 2;
    color: #FFD700;
    font-size: 0.9rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    margin: 0;
}

/* Product Gallery Section */
.product-gallery {
    padding: 6rem 0;
    background: #fafafa;
}

.product-gallery h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8B4513;
    text-align: center;
    margin-bottom: 0.5rem;
}

.product-gallery-subtitle {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(139,69,19,0.15);
    background: #ddd;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0), rgba(139,69,19,0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 480px) {
    .product-gallery h2 { font-size: 2rem; }
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #FFE4B5;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #FFE4B5;
}

.footer-section .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #ccc;
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: #fff;
    padding: 8rem 0 4rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 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);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav .mobile-menu-btn {
        display: block;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #8B4513, #A0522D);
        flex-direction: column;
        padding: 1rem 2rem;
        box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .showcase-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .floating-features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-circular-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .showcase-stats {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .floating-feature {
        padding: 2rem;
    }
    
    .features-header h2 {
        font-size: 2rem;
    }
    
    .showcase-text h2 {
        font-size: 2rem;
    }
    
    .circular-products h2 {
        font-size: 2rem;
    }
    
    .product-circle {
        width: 250px;
        height: 250px;
    }
    
    /* Constrain cards to 90% width on small screens and center */
    .floating-feature,
    .blog-card,
    .product-circle,
    .about-card,
    .review,
    .contact-method,
    .contact-form-section,
    .experience-card {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Center grid children on small screens so max-width cards align center */
    .floating-features-grid,
    .blog-grid,
    .products-circular-grid {
        justify-items: center;
    }
    /* Force single column for blog grid so cards can center nicely */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    /* Ensure blog cards don't stretch and are centered */
    .blog-card {
        width: 100%;
        max-width: 90%;
        justify-self: center;
    }
    
    /* Ensure flex column groups center narrow cards */
    .contact-methods {
        align-items: center;
    }
}