/* Global Brain Corporation - Main Styles */

/* CSS Variables */
:root {
    --primary-color: #0056b3;
    --primary-dark: #003d82;
    --primary-light: #007bff;
    --accent-color: #00a0e9;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #333333;
    --text-color: #333333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-family: 'Hiragino Kaku Gothic Pro', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo:hover {
    color: var(--primary-dark);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-gray);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-gray);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 8rem 0 4rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    color: var(--white);
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-light {
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.75rem;
}

.card-content p {
    color: var(--gray);
    margin-bottom: 0;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--primary-color);
}

.feature h3 {
    margin-bottom: 1rem;
}

.feature p {
    color: var(--gray);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-label .required {
    color: #dc3545;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
    background-color: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.9rem;
    color: var(--gray);
    cursor: pointer;
}

.form-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-submit {
    margin-top: 1rem;
}

/* Lead Form Section */
.lead-form-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.lead-form-section .section-title h2 {
    color: var(--white);
}

.lead-form-section .section-title p {
    color: rgba(255, 255, 255, 0.9);
}

.lead-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.lead-form-container .form-checkbox label {
    color: var(--gray);
}

/* Contact Info */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    padding: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.contact-details h4 {
    margin-bottom: 0.25rem;
}

.contact-details p,
.contact-details a {
    color: var(--gray);
    margin-bottom: 0;
}

.contact-details a:hover {
    color: var(--primary-color);
}

/* Map */
.map-container {
    height: 300px;
    background-color: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
}

/* Business Hours */
.business-hours {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.business-hours h4 {
    margin-bottom: 1rem;
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
}

.hours-day {
    font-weight: 500;
}

/* Services */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-detail:last-child {
    margin-bottom: 0;
}

.service-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-content ul {
    margin-top: 1rem;
}

.service-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.service-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Portfolio / Examples */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.portfolio-image {
    height: 180px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h4 {
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.legal-content h1 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
    margin-bottom: 1rem;
    color: var(--gray);
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
}

.legal-content ul {
    list-style: disc;
}

.legal-content ol {
    list-style: decimal;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.last-updated {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--gray);
}

/* Footer */
.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    fill: var(--primary-light);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text {
    margin-bottom: 1rem;
}

.cookie-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.cookie-settings {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cookie-settings.show {
    display: block;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.cookie-category-info p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 26px;
}

.cookie-toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary-color);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 6rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    background-color: var(--light-gray);
    font-size: 0.9rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item::after {
    content: '>';
    color: var(--gray);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: var(--gray);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-text h1 {
        font-size: 2.25rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .service-detail {
        grid-template-columns: 1fr;
    }
    
    .service-detail:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .lead-form-container {
        padding: 1.5rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .header,
    .cookie-banner,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
    }
}
