/* 春ロボ・夏ロボ共有のスタイル */
:root {
    --haru: #ff92cb;
    --natu: #367D0A;
    --unei: #6c757d; /* secondaryと同色 */
    --team: #87CEEB;
}
.haru-color {
    color: var(--haru);
}
.natu-color {
    color: var(--natu);
}
.unei-color {
    color: var(--unei);
}
.team-color {
    color: var(--team);
}

.text-stroked {
    text-decoration: line-through;
}

/* Download file buttons */
.download-file a {
    padding-top: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.download-file a p {
    color: #c1c1c1;
    font-weight: lighter;
}
.download-file a h4 {
    color: #fefefe;
}
.download-file .btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 120px; 
    padding: 0.5rem 1rem;
}
.download-past-file .btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 80px;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
}
.download-file .btn h4 { margin: 0 0 0.25rem 0; font-size: 1.5rem; }
.download-file .btn p { margin: 0; font-size: 1.4rem; }

@media (min-width: 992px) {
    /* on wide screens tiles sit in columns; reduce bottom margin to avoid extra gap */
    .download-file { margin-bottom: 0.5rem; }
}


/* @media (min-width: 768px) { */
@media (min-width: 992px) {
    #nav_items li {
        display: block;
        width: 106px;
        font-size: 13px;
        padding: 0 3px;
    }
    #nav_items li:not(:first-child){
        border-left: 1px solid rgba(255, 255, 255, .3);
    }
    #nav_items li > a {
        position: relative;
        padding-top: 40px;
        margin: 0;
        width: 100%;
        height: 60px;
        text-align: center;
    }
    .nav-item > a > span::before {
        position: absolute;
        top: 0;
        left: 38%;
        font-size: 27px;
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
    }
    .nav-home     > a > span::before { content: '\f015'; }
    .nav-entry    > a > span::before { content: '\f1d8'; }
    .nav-rulebook > a > span::before { content: '\f02d'; }
    .nav-history  > a > span::before { content: '\f1da'; }
    .nav-event    > a > span::before { content: '\f073'; }
    .nav-contact  > a > span::before { content: '\f0e0'; }
    .nav-login    > a > span::before { content: '\f2f6'; }
    .nav-member   > a > span::before { content: '\f0c0'; }
    /* for unei */
    .nav-about-us > a > span::before { content: '\f059'; }
    .nav-recruit  > a > span::before { content: '\f234'; }
    .nav-sponsor  > a > span::before { content: '\f4b9'; }
    .nav-document > a > span::before { content: '\f07c'; }
    .nav-minutes  > a > span::before { content: '\f0c6'; }
}

@media (max-width: 575px) {
    .d-xs-none {
        display: none;
    }
}

#container {
    padding-top: 20px;
}

.head-icon {
    width: 70px;
    height: 70px;
    color: #fefefe;
    font-size: 40px;
    padding: 5px 0;
    margin: 10px auto;
    border-radius: 35px;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

section {
    margin: 20px 0 40px;
}
.section-title {
    margin-bottom: 20px;
}
.table-no-border td {
    border-top: none;
}
.table-bottom-border tr:last-of-type td {
    border-bottom: 1px solid #dee2e6;
}

footer {
    color: rgba(255, 255, 255, 0.75);
    padding-top: 30px;
    padding-top: 20px;
}
footer strong {
    color: rgba(255, 255, 255, 1.0);
}
footer nav ul{
    text-align: right;
}
footer nav ul li{
    display: inline;
    margin-left: 20px;
}
footer nav ul li a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}
footer nav ul li a:hover {
    color: rgba(255, 255, 255, 0.75);
}

.mail-address {
    background-clip: border-box;
    border: 1px solid var(--theme-color);
    border-radius: 0.25rem;
    padding: 12px 20px;
    margin: 10px 10px 10px 20px;
}

#contest_summary .sponsor ul {
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}
#contest_summary .sponsor ul li:not(:last-child) {
    margin-bottom: .2em;
}

#sponsor tr {
    height: min(20vw, 160px);
}
#sponsor tr td:nth-child(1) {
    width: 50%;
    vertical-align: middle;
}
#sponsor tr td:nth-child(2) {
    vertical-align: middle;
    text-align: center;
}
#sponsor tr td:nth-child(2) img {
    max-height: min(20vw, 160px);
}
#sponsor tr td:nth-child(2) img[alt="ウルトエレクトロニクス様 ロゴ画像"] {
    /* 他のロゴと比べて横に長く大きいため微調整 */
    max-height: min(18vw, 140px);
}

ul.kome li {
    list-style-type: none;
    text-indent: -1.5em;
}
ul.kome li:before {
    display: inline;
    content: "※";
    padding-right: 0.5em;
}

/* Video embed: centralized, responsive styling
   Use a wrapper with class `video-embed` and optionally Bootstrap 5 `ratio` classes.
   Example in templates:
     <div class="video-embed ratio ratio-16x9" id="video-digest-2025">\n      <iframe src="..." allowfullscreen></iframe>\n     </div>
*/
.video-embed {
    max-width: 1236px; /* desktop max width, matches existing hard-coded widths */
    margin-left: auto;
    margin-right: auto;
}
.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
/* Fallback for browsers that don't support .ratio: keep iframe aspect ratio */
@supports not (height: 100%) {
    .video-embed iframe {
        aspect-ratio: 16/9;
        height: auto;
    }
}

#nav_items li > a.nav-link::after {
    content: "";
    position: absolute;
    left: 0%;
    right: 0%;
    bottom: 0px;
    height: 1px;
    background: rgba(248, 248, 248, 0.95);
    border-radius: 1px;
    opacity: 0;
    transform: scaleX(1);
    transition: opacity .12s ease, transform .12s ease;
    pointer-events: none;
    z-index: 0;
}
#nav_items li > a.nav-link.active::after {
    opacity: 1;
}

/* Fallback for very small screens: slightly shorter underline */
@media (max-width: 575px) {
    #nav_items li > a.nav-link::after {
        left: 20%;
        right: 20%;
        bottom: 10px;
        height: 0px;

    }
}

/* Ensure we don't get a double underline from Bootstrap's built-in pseudo-element.
   Hide any ::before underline generated by Bootstrap for our header nav items so
   only the custom ::after (thin white line) is visible. Use high specificity but
   keep scope limited to #nav_items to avoid site-wide side effects. */
#nav_items li > a.nav-link::before {
    /* hide Bootstrap's underline pseudo-element only (prevents double-line)
       but keep span::before for our Font Awesome icons */
    display: none !important;
    border: none !important;
    content: none !important;
}

/* Support active state placed on the <li> instead of the <a> so HISTORY
   receives the same single white underline as RULE BOOK when its parent <li>
   has the .active class. */
#nav_items li.active > a.nav-link::after {
    opacity: 1;
}

