/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    max-width: 100%;
    overflow-x: hidden; /* prevent horizontal scroll from small negative margins */
    -webkit-overflow-scrolling: touch;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
}

/* Colors */
:root {
    --primary-color: #C71585; /* Dark Matte Pink */
    --accent-color: #4A4A4A; /* Grey */
    --light-bg: #ffffff;
    --text-color: #333;
    --link-color: #C71585;
}

/* Navigation */
header {
    background-color: var(--light-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Logo responsiveness and safe edge spacing */
.logo-img {
    height: 1.95em; /* slightly larger on desktop */
    width: auto;
    display: block;
    margin-left: -1.2rem; /* shift left on desktop but stay visible */
    transform: translateX(-10px);
}

@media (max-width: 1024px) {
    .logo-img {
        height: 1.6em;
        margin-left: -0.8rem;
        transform: translateX(-6px);
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.35rem;
    }
    .logo-img {
        height: 1.4em;
        margin-left: -0.4rem;
        transform: translateX(-3px);
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 1.1em;
        margin-left: 0; /* avoid overlap */
        transform: none;
    }

    /* Ensure nav padding keeps content visible on tiny screens */
    nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
} 

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Highlighted Menu Item */
.nav-links .highlight {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links .highlight:hover {
    background-color: #8B008B;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--light-bg);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.quote-form {
    display: flex;
    flex-direction: column;
}

.quote-form .form-group {
    margin-bottom: 15px;
}

.quote-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.quote-form textarea {
    height: 100px;
    resize: vertical;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #8B008B;
}

/* Hero Section */
.hero {
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    min-height: 320px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding: 2rem 1rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 182, 193, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

@media (max-width: 480px) {
    .hero {
        height: auto;
        min-height: 280px;
        padding: 3rem 1rem;
        align-items: flex-end;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-content {
        padding: 1rem;
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #8B008B;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Featured Products */
.featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.product-card h3 {
    padding: 1rem;
    color: var(--primary-color);
}

.product-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
    flex: 1 0 auto;
}

.product-card a {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    border-radius: 0 0 8px 8px;
}

.product-card a:hover {
    background-color: #8B008B;
}

.product-card a {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.product-card a:hover {
    background-color: #8B008B;
}

/* Footer */
footer {
    background-color: var(--accent-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    width: 140px; /* larger size */
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .footer-logo img {
        width: 110px; /* tablet */
    }
}

@media (max-width: 480px) {
    .footer-logo img {
        width: 80px; /* mobile */
    }
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--light-bg);
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .featured-products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .hero {
        height: 50vh;
    }

    .hero-content {
        padding: 1rem;
    }

    main {
        padding: 1rem;
    }
}

/* Page Specific Styles */
.about-section, .products-section, .applications-section, .custom-solutions-section, .quality-assurance-section, .contact-section {
    padding: 4rem 0;
}

.about-section {
    background-color: var(--light-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
    max-height: 220px;
}

.application-item, .quality-step {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.application-item img, .quality-step img {
    width: 150px;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1.5rem;
    display: block;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

/* Layout Helpers */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card {
    background-color: var(--light-bg);
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* About Page */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent; /* merged with section white background */
    border-radius: 0;
    box-shadow: none;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Section tweaks */
.section {
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.section h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.about-content p {
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Prevent long words or unbroken text from pushing containers wider */
p, li {
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .application-item, .quality-step {
        flex-direction: column;
        align-items: flex-start;
    }

    .application-item img, .quality-step img {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 300px;
    }

    .product-card img {
        aspect-ratio: 4/3;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #8B008B;
}
