@charset "utf-8";

/* =====================================
   common.css
   新居浜高専 生物応用化学科
   共通スタイル
===================================== */

/* ---------- Base ---------- */

:root{
    --primary:#2e7d32;
    --primary-dark:#1f5a24;
    --primary-light:#e8f5e9;

    --text:#333333;
    --bg:#f8faf8;

    --shadow:0 4px 20px rgba(0,0,0,0.08);
    --radius:16px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:
        "Noto Sans JP",
        "Hiragino Sans",
        "Yu Gothic",
        sans-serif;
    font-weight:400;
    background:var(--bg);
    color:var(--text);
    line-height:1.8;
}

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

button,
input,
textarea,
select{
    font:inherit;
}

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

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

/* ---------- Layout ---------- */

.container{
    width:min(1200px,92%);
    margin:auto;
    margin-bottom:10px;
}

section{
    padding:80px 0 0 0;
}

/* ---------- Header ---------- */

.site-header{
    background:#fff;
    position:sticky;
    top:0;
    z-index:1000;
    width:100%;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.header-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    padding:15px 0;
}

.header-right{
    display:flex;
    align-items:center;
    gap:1rem;
    flex-shrink:0;
}

.site-logo img{
    height:65px;
    width:auto;
}

.nct-link,
.external-link{
    color:#666;
    font-size:0.95rem;
    white-space:nowrap;
    display:inline-flex;
    align-items:center;
    gap:0.35rem;
}


/* ---------- Navigation ---------- */

.main-nav{
    background:linear-gradient(180deg, #387238, #0e470e);
    border-top:1px solid rgba(255,255,255,0.10);
    border-bottom:3px solid var(--primary-dark);
}

.main-nav ul,
.main-nav .navbar-nav{
    list-style:none;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:2.2rem;
    margin:0;
    padding:0.9rem 0;
    width:100%;
    flex-wrap:wrap;
}

.main-nav a,
.main-nav .nav-link{
    color:#fff;
    font-weight:600;
    position:relative;
    padding:0.25rem 0;
    font-size:1rem;
}

.main-nav a::after,
.main-nav .nav-link::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:0;
    height:2px;
    background:#dff4e1;
    transition:0.3s;
}

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

.main-nav .nav-link.active{
    color:#dff4e1 !important;
}

.nav-separator{
    width:1px;
    height:1.6rem;
    background:rgba(255,255,255,0.35);
    margin:0 0.5rem;
}

/* ---------- Mobile menu button ---------- */

.menu-toggle{
    display:none;
    background:none;
    border:none;
    padding:0;
    cursor:pointer;
}

.menu-toggle span{
    display:block;
    width:24px;
    height:2px;
    border-radius:999px;
    background:#1f4430;
    margin:5px 0;
    transition:0.3s;
}

/* =====================================
   Mobile Navigation
===================================== */

@media (max-width:768px){

    .main-nav{
        display:none;
        width:100%;
    }

    .main-nav.active{
        display:block;
    }

    .main-nav ul{
        flex-direction:column;
        gap:0;
        padding:0;
    }

    .main-nav li{
        width:100%;
    }

    .main-nav a{
        display:block;
        padding:0.5rem 1rem;
        text-align:center;
        font-size:0.9rem;
        line-height:1.3;
        border-top:1px solid rgba(255,255,255,0.08);
    }

    .nav-separator{
        display:none;
    }
}


/* ---------- Hero（共通） ---------- */

.hero{
    position:relative;
    height:70vh;
    min-height:520px;
    overflow:hidden;
    display:flex;
    justify-content:center;
    align-items:flex-end;
    padding-bottom:8vh;
}

.hero-slide{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center center;
    opacity:0;
    animation:heroFade 24s infinite;
}

.slide1{ animation-delay:0s; }
.slide2{ animation-delay:6s; }
.slide3{ animation-delay:12s; }
.slide4{ animation-delay:18s; }

@keyframes heroFade{
    0%{opacity:0;}
    5%{opacity:1;}
    25%{opacity:1;}
    30%{opacity:0;}
    100%{opacity:0;}
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(
        to top,
        rgba(0,0,0,0.35),
        rgba(0,0,0,0.10)
    );
    z-index:2;
}

.hero-content{
    position:relative;
    z-index:3;
    text-align:center;
    color:#fff;
    width:min(900px,90%);
    padding:20px;
}

.hero-subtitle{
    font-size:0.85rem;
    letter-spacing:0.25em;
    text-transform:uppercase;
    margin-bottom:18px;
    opacity:0.85;
}

.hero-content h1{
    font-size:clamp(2.2rem,5vw,3.8rem);
    font-weight:700;
    margin-bottom:0.8rem;
    line-height:1.3;
    text-shadow:
        0 2px 8px rgba(0,0,0,0.35),
        0 0 18px rgba(0,140,80,0.18);
}

.hero-content p{
    font-size:1.05rem;
    margin-bottom:1.8rem;
    opacity:0.9;
    text-shadow:0 2px 10px rgba(0,0,0,0.35);
}

.hero-mini{
    height:35vh;
    min-height:220px;
    align-items:center;
    padding-bottom:0;
}

.hero-mini .hero-content{
    width:min(780px,90%);
    padding:0 16px;
}

.hero-mini .hero-content h1{
    font-size:clamp(1.8rem,4vw,2.4rem);
    margin-bottom:0.35rem;
}

.hero-mini .hero-content p{
    font-size:0.95rem;
    margin-bottom:0;
}

/* ---------- Section Title ---------- */

.section-title{
    font-size:clamp(1.6rem,2.2vw,2rem);
    font-weight:700;
    margin-bottom:2rem;
    text-align:center;
    color:var(--text);
    line-height:1.3;
}

.section-title::after{
    content:"";
    display:block;
    width:70px;
    height:4px;
    margin:12px auto 0;
    border-radius:999px;
    background:linear-gradient(
        90deg,
        var(--primary),
        #66bb6a
    );
}

/* ---------- Card ---------- */

.card-modern{
    background:#fff;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:2rem;
}

/* ---------- Button ---------- */

.btn-main{
    display:inline-block;
    background:var(--primary);
    color:#fff;
    padding:0.9rem 1.8rem;
    border-radius:999px;
    font-weight:600;
    transition:0.3s;
    box-shadow:0 5px 15px rgba(46,125,50,0.25);
}

.btn-main:hover{
    background:var(--primary-dark);
    color:#fff;
    transform:translateY(-3px);
    box-shadow:0 10px 20px rgba(46,125,50,0.35);
}

/* ---------- Footer ---------- */

.site-footer{
    background:#1f4430;
    color:#fff;
    text-align:center;
    padding:40px 20px;
    margin-top:80px;
}

.site-footer p{
    font-size:0.95rem;
    line-height:1.8;
    opacity:0.95;
}

/* ---------- Page Top ---------- */

#page-top{
    position:fixed;
    right:20px;
    bottom:20px;

    width:56px;
    height:56px;

    border-radius:50%;

    background:var(--primary);

    display:flex;
    justify-content:center;
    align-items:center;

    color:white;

    box-shadow:0 4px 12px rgba(0,0,0,0.2);

    z-index:999;
}

#page-top i{
    font-size:1.2rem;
}


/* ---------- Responsive ---------- */

@media (max-width:768px){

    .header-inner{
        padding:0.9rem 0;
    }

    .site-logo img{
        height:52px;
    }

    .header-right{
        gap:0.75rem;
    }

    .nct-link,
    .external-link{
        font-size:0.82rem;
    }

    .menu-toggle{
        display:block;
        width:44px;
        height:44px;
        border-radius:50%;
        background:#f4f6f4;
        box-shadow:0 3px 10px rgba(0,0,0,0.08);
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        padding:0 10px;
    }

    .main-nav ul,
    .main-nav .navbar-nav{
        gap:1rem;
        flex-wrap:wrap;
        justify-content:center;
    }

    .section-title{
        font-size:1.6rem;
        margin-bottom:2.2rem;
    }

    .hero:not(.hero-mini){
    height:65vh;
    min-height:520px;
    padding-bottom:6vh;
    }

    .hero-content{
        padding:16px;
    }

    .hero-content h1{
        font-size:2.1rem;
    }

    .hero-content p{
        font-size:0.95rem;
        margin-bottom:1.2rem;
    }

    .hero-mini{
        height:22vh;
        min-height:160px;
    }

    .hero-mini .hero-content{
        width:min(92%,700px);
        padding:0 12px;
    }

    .hero-mini .hero-content h1{
        font-size:1.6rem;
    }

    section{
        padding:10px 0;
    }

    #page-top{
        width:54px;
        height:54px;
        right:14px;
        bottom:14px;
    }

    #page-top a{
        width:54px;
        height:54px;
    }

    #page-top a::after{
        font-size:10px;
        bottom:8px;
    }
}