/* Modern Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

/* Flexbox layout for sticky footer on subpages */
body.subpage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 60px 0;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Header */
header {
    background-color: #9e2438;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    max-height: 50px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
    opacity: 1;
}

/* Footer */
footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0;
    font-size: 0.8rem;
    margin-top: auto; /* Pushes footer to bottom in flex layout */
}


/* =========================================
   Top Page Specific (index2.html)
   ========================================= */

/* Hero Section */
#hero {
    background-image: url('../images/hero_background.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    text-align: center;
}

#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    line-height: 1.4;
    font-weight: 700;
}

.btn {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    border: 1px solid transparent;
}

.btn:hover {
    background-color: #fff;
    color: #000;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.service-item-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-icon {
    flex: 0 0 80px;
    text-align: center;
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #222;
}

.service-sub {
    font-size: 0.95rem;
    color: #666;
}

/* Team Section */
.team-title {
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

.team-desc {
    max-width: 800px;
    margin: 0 auto 50px;
    color: #666;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.team-member {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.member-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.member-role {
    color: #888;
    font-size: 0.9rem;
}


/* =========================================
   Subpage Common (company, contact, product)
   ========================================= */

/* Page Header */
.page-header {
    background-color: #333;
    background-image: url('../images/hero_background.jpg');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
    color: #fff;
    position: relative;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.page-title {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    font-weight: 700;
}


/* =========================================
   Company Page (company2.html)
   ========================================= */

.company-info {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.company-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #9e2438;
}

.company-section p {
    font-size: 1rem;
    margin-bottom: 10px;
}

.company-section strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #444;
}


/* =========================================
   Contact Page (contact2.html)
   ========================================= */

.contact-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-desc {
    margin-bottom: 30px;
}

.contact-btn {
    display: inline-block;
    background-color: #9e2438;
    color: #fff;
    padding: 15px 40px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    background-color: #c42b45;
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
}


/* =========================================
   Product Page (product2.html)
   ========================================= */

.product-list {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.intro-text {
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
    padding-bottom: 20px;
    color: #666;
    font-style: italic;
}

.product-item {
    margin-bottom: 50px;
}

.product-item:last-child {
    margin-bottom: 0;
}

.product-title {
    font-size: 1.6rem;
    color: #9e2438;
    margin-bottom: 15px;
    border-left: 5px solid #9e2438;
    padding-left: 15px;
}

.product-desc {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
}

hr.styled-hr {
    border: 0;
    height: 1px;
    background: #e5e5e5;
    margin: 40px 0;
}


/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }

    .nav-menu {
        margin-top: 15px;
        gap: 20px;
        flex-wrap: wrap; /* Added based on subpages css */
        justify-content: center; /* Added based on subpages css */
    }

    .team-grid {
        grid-template-columns: 1fr;
    }
}
