/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header */
header {
    background: #1a1a1a;
    padding: 1rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    width: 100%;
    z-index: 1000;
    height: 80px;
}

.header-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.company-name {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 1rem;
    white-space: nowrap;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 3rem;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #28a745;
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: #28a745;
}

/* Adjust main content for fixed header */
main {
    padding-top: 0;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/coffee-factory.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin: 0 auto;
    max-width: 800px;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background-color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 1rem;
    display: block;
}

/* Coffee Selection */
.coffee-selection {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #f9f9f9;
}

.coffee-type p {
    color: #666;
    margin-top: 0.5rem;
}

/* Who We Are Section */
.who-we-are {
    padding: 6rem 2rem;
    background-color: #f9f9f9;
}

.two-column {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.text-content {
    padding-right: 2rem;
}

.text-content h2 {
    font-size: 2.5rem;
    color: #2c1810;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4a4a;
    margin-bottom: 2rem;
}

.image-content {
    position: relative;
    opacity: 0.85;
}

.image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
}

.learn-more {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.learn-more:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Our Coffee Section */
.our-coffee {
    padding: 4rem 2rem;
    text-align: center;
}

.coffee-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    max-width: 1000px;
    margin: 3rem auto;
}

.coffee-type img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem 1rem 0.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section ul li a {
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    header {
        padding: 0.5rem;
        position: relative;
        flex-direction: row;
        justify-content: center;
        height: 70px;
    }
    
    .logo {
        margin: 0;
        position: relative;
        z-index: 1002;
    }
    
    .header-logo {
        height: 40px;
        max-width: 150px;
    }
    
    .company-name {
        font-size: 0.9rem;
        margin-left: 0.5rem;
    }
    
    .hamburger {
        display: flex;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        padding: 0.5rem;
    }
    
    .hamburger span {
        width: 25px;
        height: 2px;
        background: #ffffff;
        margin: 4px 0;
        transition: all 0.3s ease;
        display: block;
    }
    
    nav {
        display: none;
        position: fixed;
        top: 0;
        left: -250px;
        height: 100vh;
        width: 250px;
        background: #1a1a1a;
        padding-top: 70px;
        transition: all 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1001;
    }
    
    nav.active {
        display: block;
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 25px;
        color: #ffffff;
        border-bottom: 1px solid #333;
    }
    
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .coffee-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding-top: 0;
    }
    
    .page-hero {
        height: 50vh;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.7rem;
        font-size: 16px;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .info-item {
        margin-bottom: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 0 0.5rem;
    }
    
    .footer-section h4 {
        margin-bottom: 0.75rem;
        font-size: 1rem;
    }
    
    .footer-section p,
    .footer-section ul li {
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
    }
    
    .footer-section ul li:last-child {
        margin-bottom: 0;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    .loader-wrapper p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .coffee-bean {
        font-size: 32px;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .contact-form h2,
    .contact-info h2 {
        font-size: 1.8rem;
    }
    
    .info-item h3 {
        font-size: 1.2rem;
    }
    
    .info-item p {
        font-size: 1rem;
    }
}

/* Image Carousel */
.carousel {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 3s ease;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #ffffff;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

/* Page Hero (for all pages except home) */
.page-hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.page-hero .hero-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero .hero-content {
    text-align: center;
    max-width: 800px;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Contact Page Styles */
.contact-content {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.contact-info {
    padding: 2rem;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

/* Contact Form Select Styles */
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    background-color: white;
}

.form-group select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

/* About Page Styles */
.about-content h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #2c1810;
    font-size: 2.2rem;
}

.about-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.about-intro p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-features {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
}

.about-mission {
    text-align: center;
    padding: 4rem 2rem;
}

.mission-statement {
    font-size: 1.3rem;
    font-style: italic;
    color: #2c1810;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Products Page Styles */
.intro-section {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.intro-section h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #2c1810;
}

.intro-section .subtitle {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 2rem;
}

.intro-section .intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 600;
    color: #2c1810;
    margin: 3rem 0;
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.product-descriptions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.product-desc h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2c1810;
}

.product-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sample-button-container,
.centered-heading,
.cta-container {
    text-align: center;
    width: 100%;
    margin: 2rem auto;
}

.centered-button {
    display: inline-block;
    margin: 0 auto;
}

/* Contact Form Styles */
.contact-form .cta-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, #28a745, #218838);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.contact-form .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    background: linear-gradient(to right, #218838, #1e7e34);
}

.contact-form .cta-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.2);
}

/* Thank You Page Styles */
.thank-you-section {
    text-align: center;
    padding: 8rem 2rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-section h1 {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.thank-you-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.thank-you-section .cta-button {
    display: inline-block;
    margin-top: 1rem;
}

/* Loader Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    position: relative;
}

.coffee-bean {
    font-size: 40px;
    animation: spin 2s infinite linear;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader-wrapper p {
    margin-top: 20px;
    color: #2c1810;
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Styles - Portrait and Small Screens */
@media screen and (max-width: 768px), (orientation: portrait) {
    nav {
        display: none;
        position: fixed;
        top: 0;
        left: -250px;
        height: 100vh;
        width: 250px;
        background: #1a1a1a;
        padding-top: 70px;
        transition: all 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1001;
    }

    nav.active {
        display: block;
        left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 15px 25px;
        color: #ffffff;
        border-bottom: 1px solid #333;
    }

    .hamburger {
        display: block;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }
}

/* Landscape Mode - Show regular menu */
@media screen and (min-width: 769px) and (orientation: landscape) {
    nav {
        display: block;
    }

    nav ul {
        display: flex;
        gap: 3rem;
    }
}

/* Products Page Mobile Adjustments */
@media (max-width: 768px) {
    .product-descriptions {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-images {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-img img {
        height: 300px;
    }
}

/* Contact Page Mobile Adjustments */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .contact-form {
        order: -1;
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .contact-info {
        background: #f9f9f9;
        border-radius: 8px;
        padding: 2rem 1.5rem;
        margin-top: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .info-item {
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid #eee;
    }

    .info-item:last-child {
        border-bottom: none;
    }

    .page-hero {
        height: 40vh;
    }

    .hero-title {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.75);
    }
}

/* Additional mobile optimization for very small screens */
@media (max-width: 480px) {
    .contact-content {
        padding: 2rem 1rem;
    }

    .contact-form h2,
    .contact-info h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}

/* Specific spacing adjustments */
.sample-button-container {
    padding: 2rem 0 4rem;
}

.centered-heading {
    margin-bottom: 3rem;
    color: #2c1810;
    font-size: 2.2rem;
}

.cta-container {
    margin-top: 3rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .centered-heading {
        font-size: 1.8rem;
        padding: 0 1rem;
    }
}

