/* Base Academics */
.floating-container {
    /* margin-left: 50px;
    margin-right: 50px; */
    background-color: #fff;
    border-radius: 4px; /* Subtle rounding */
    box-shadow: 0 15px 45px rgba(0,0,0,0.1); /* Floating shadow */
    position: relative;
    z-index: 10;
    overflow: hidden; /* Clips children to rounded corners */
}
.programs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns */
    text-align: center;
}
.program-card {
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #eee; /* Vertical Dividers */
    text-decoration: none;
}
.program-card:last-child {
    border-right: none;
}
.icon-box i {
    width: 50px;
    height: 50px;
    object-fit: contain;
    color: var(--accent-orange);
    margin-bottom: 40px;
}
.program-title-en {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 600;
    min-height: 4.5em; /* Keeps text aligned regardless of length */
}
.program-title-th {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.8;
}

.roadmap {
    max-width: 1100px; /* กำหนดความกว้างสูงสุด (ปรับตัวเลข 800px ลงได้ถ้ายังใหญ่ไป) */
    margin: 20px auto; /* จัดกล่องให้อยู่กึ่งกลาง (auto) และเว้นระยะบนล่าง 40px */
    text-align: center;
}

.roadmap img {
    width: 100%; /* ให้รูปภาพกว้างเต็มพื้นที่ max-width */
    height: auto; /* รักษาสัดส่วนของรูปไว้ ไม่ให้ยืดหรือเบี้ยว */
    border-radius: 10px; /* (ตัวเลือกเสริม) ทำให้มุมรูปภาพโค้งมนดูสวยขึ้น */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* (ตัวเลือกเสริม) เพิ่มเงาให้รูปดูนูนขึ้นมา */
}
#roadmap-com {
    max-width: 800px; /* กำหนดความกว้างสูงสุด (ปรับตัวเลข 800px ลงได้ถ้ายังใหญ่ไป) */
    margin: 20px auto; /* จัดกล่องให้อยู่กึ่งกลาง (auto) และเว้นระยะบนล่าง 40px */
    text-align: center;
}


/* Title */
.header {
    /* margin: 0; */
}
.body {
    font-family: 'Sarabun', sans-serif;
    /* margin: 0; */
}
#physiot-title {
    font-size: 1.5rem;
}
.short-text {
    display: none;
}
.full-text {
    display: inline;
}

/* Button */
.header-content {
    display: flex;             /* Enables Flexbox */
    justify-content: space-between; /* Pushes title left and button right */
    align-items: center;       /* Aligns them vertically */
    padding-bottom: 0;
    gap: 20px;
}
.button {
    display: flex;
    flex-direction: column; /* Stacks the buttons vertically */
    gap: 10px;              /* This is the magic property for spacing! */
    align-items: flex-end;  /* Keeps buttons aligned to the right like in your image */
}
.btn {
    background-color: var(--accent-orange); /* Uses your IoT orange variable */
    color: #ffffff !important;              /* White text */
    padding: 15px 15px;
    border-radius: 8px;                    /* Creates the pill shape */
    text-decoration: none;                  /* Removes link underline */
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;                          /* Flexbox for icon and text alignment */
    align-items: center;
    gap: 10px;                              /* Space between icon and text */
    /* box-shadow: 0 4px 12px rgba(255, 119, 0, 0.3); */
    transition: all 0.3s ease;              /* Smooth animation for hover */
    z-index: 10;                            /* Keeps button above other elements */
    min-width: 205px;
}
.btn i {
    color: #ffffff; 
}
.btn:hover {
    background-color: #e66a00;              /* Slightly darker orange */
    transform: translateY(-2px);            /* Lifts the button slightly */
    box-shadow: 0 3px 8px rgba(255, 119, 0, 0.4);
}

/* --- ADMISSION TIMELINE (TCAS STYLE) --- */
.admission-timeline-container {
    margin-top: 60px;
    text-align: center;
}
.admission-main-title {
    color: var(--accent-orange);
    font-size: 2rem;
    font-family: 'Prompt', sans-serif;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
}
.tcas-wrapper {
    position: relative;
    padding: 40px 0;
}
/* Horizontal dotted line */
.tcas-line {
    position: absolute;
    top: 95px; /* Aligns with the dots */
    left: 10%;
    right: 10%;
    border-top: 1px dashed #ccc;
    z-index: 1;
}
.tcas-steps {
    display: flex;
    justify-content: space-around;
    position: relative;
    z-index: 2;
}
.tcas-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
}
.tcas-date {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #333;
}
.tcas-date strong {
    font-size: 1.3rem;
    color: #000;
}
.tcas-dot {
    width: 14px;
    height: 14px;
    background-color: #000;
    border-radius: 50%;
    margin-bottom: 30px;
    border: 4px solid var(--white); /* Masks the line behind the dot */
}
.tcas-code {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-orange);
    font-family: 'Prompt';
}
.tcas-name {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
}
.tcas-capacity {
    background: #000;
    color: #fff;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: inline-block;
}

/* Price */
.featured-pic {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.academic-content {
    text-align: center; /* Centered content like the image */
}
.academic-title {
    color: var(--white);
    font-size: 2rem;
    font-family: 'Prompt', sans-serif;
    margin-bottom: 25px;
}
.academic-text {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.8;
    color: #444;
    margin-bottom: 40px;
}
.register-btn {
    background-color: var(--accent-orange);
    color: white;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
    transition: all 0.3s ease;
}
.register-btn:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
}
.tuition-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 132, 0, 0.536); /* Black with 60% transparency */
    z-index: 0;
}
.tuition-info {
    position: relative;
    flex: 1;
    padding: 60px;
    color: var(--white);
    z-index: 2;
}
.tuition-title {
    font-size: 2.2rem;
    font-family: 'Sarabun', sans-serif;
    margin-bottom: 5px;
}
.program-label {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}
.price {
    font-size: 4.5rem; /* Large impact font */
    font-weight: 800;
    font-family: 'Sarabun', sans-serif;
    display: block;
    line-height: 1;
}
.unit {
    font-size: 1.3rem;
    margin-top: 10px;
}
/* --- Photo Stack --- */
.tuition-images {
    flex: 1;
    position: relative;
    height: 100%;
    margin-top: 0px;
    margin-bottom: 190px;
}
.photo-frame {
    background: white;
    padding: 10px 10px 30px 10px; /* Polaroid style */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: absolute;
    width: 250px;
    border-radius: 5px;
}
/* Position frames like the reference */
.photo-1 {
    top: -40px;
    right: 180px;
    transform: rotate(-5deg);
}
.photo-2 {
    top: 20px;
    right: 40px;
    transform: rotate(3deg);
    z-index: 3;
}
.photo-frame img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* --- Tuition Card*/
.tuition-card-iot,
.tuition-card-com {
    position: relative; /* Removed the duplicate declaration */
    background-image: url('/images/academics/iote/engineering-building.jpg');
    background-size: cover;
    background-position: center; /* Added for better image centering */
    border-radius: 20px;
    display: flex;
    min-height: 350px;
    align-items: center;
    overflow: hidden;
    margin: 50px 50px; /* Added 'auto' to ensure it centers on large screens */
}
.tuition-card-sci {
    position: relative; /* Removed the duplicate declaration */
    background-image: url('/images/academics/physiot/science-building.jpg');
    background-size: cover;
    background-position: center; /* Added for better image centering */
    border-radius: 20px;
    display: flex;
    min-height: 350px;
    align-items: center;
    overflow: hidden;
    margin: 50px 50px; /* Added 'auto' to ensure it centers on large screens */
}
.tuition-card-iot::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Switched to a slightly deeper orange for better contrast */
    background-color: rgba(255, 119, 0, 0.5); 
    z-index: 0;
}
.tuition-card-sci::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Switched to a slightly deeper orange for better contrast */
    background-color: rgba(255, 213, 0, 0.5); 
    z-index: 0;
}
.tuition-card-com::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Switched to a slightly deeper orange for better contrast */
    background-color: rgba(255, 81, 33, 0.5); 
    z-index: 0;
}
.tuition-info {
    position: relative;
    z-index: 2;
}
.tuition-title-text {
    font-size: 2.2rem;
    font-family: 'Sarabun', sans-serif;
    font-weight: 700; /* Replaces h2 bolding */
    margin: 0 0 5px 0;
    color: white;
}
.program-label-text {
    font-size: 1.2rem;
    font-family: 'Sarabun', sans-serif;
    margin: 0 0 30px 0;
    color: white;
    opacity: 0.9;
}
.price-amount {
    font-size: 4.5rem;
    font-weight: 800;
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    color: white;
    line-height: 1;
}
.unit-text {
    font-size: 1.3rem;
    font-family: 'Sarabun', sans-serif;
    margin: 10px 0 0 0;
    color: white;
}
.photo-frame {
    background: white;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: absolute;
    width: 250px;
    border-radius: 5px;
}

/* Info */
.info-section {
    margin-top: 0px;
    /* padding: 40px 40px 0px 40px; */
    margin: 50px;
    /* background: #4040402c; */
    border-radius: 30px;
    /* color: #333; */
    text-align: center;
    /* border: 1px solid black; */
    /* gap: 50px; */
    display: flex;
    flex-direction: column; /* Stacks the buttons vertically */
    gap: 10px;              /* This is the magic property for spacing! */
    align-items: center;  /* Keeps buttons aligned to the right like in your image */
}
.info-header {
    color: #a04000; /* Darker orange/brown title */
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 30px;
}
.info-description {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 2;
    max-width: 1200px;
    margin: 0 auto 50px;
}
.info-media {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Photo on left, text on right */
    gap: 20px;
    align-items: center;
    text-align: left;
    margin: 0 auto 50px;
    max-width: 1200px;
    line-height: 2;
}
li {
    line-height: 2;
}
.media-img {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.media-img img {
    width: 100%;
    /* width: 1000px; */
    /* height: 500px; */
    /* object-fit: contain; */
    display: block;
}
.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, var(--accent-orange));
}
.media-title {
    color: #a04000;
    font-weight: 700;
    font-size: 1.5rem;
    /* margin-left: -20px; */
}
.media-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
    max-width: 800px;
    margin-left: 20px;
}
/* #info-career {
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 0 auto 50px;
} */

#info-career {
    display: grid;
    /* Changed from 2fr 1fr to 1.2fr 1fr to make the image side wider */
    grid-template-columns: 1fr 1fr; 
    gap: 40px; /* Increased gap for a cleaner look */
    align-items: center; /* Aligns image vertically with the list */
    margin: 0 auto 50px;
    max-width: 1200px;
}

/* Specific styling for the career image container */
.career-img-container {
    width: 100%;
    height: auto;
    max-width: 500px; /* Limits the maximum growth */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); /* Slightly deeper shadow for depth */
}

.career-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the container without stretching */
    display: block;
    transition: transform 0.3s ease;
}

/* Subtle hover effect to make it look professional */
/* .career-img-container:hover img {
    transform: scale(1.03);
} */


/* Mobile Responsiveness */
@media (max-width: 992px) {
    .full-text {
        display: none; /* Hide 'Bachelor' */
    }
    .short-text {
        display: inline; /* Show 'B.' */
    }
    .tuition-card-iot,
    .tuition-card-sci,
    .tuition-card-com { 
        flex-direction: column; 
        text-align: center;
        margin: 20px 20px 50px 20px;
        padding: -20px;
    }
    .tuition-images { 
        display: none; /* Hide photos on small mobile to save space */
    }
    .info-section {
        margin: 5px;
    }
    .info-media {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 20px;
    }
    #info-career {
        grid-template-columns: 2fr 1fr;
        gap: 20px;
    }
    .info-header {
        font-size: 1.4rem;
    }
}

/* For Mobile Phones (up to 600px) */
@media (max-width: 768px) {

    .header-content {
        flex-direction: column;             /* Stacks title and button on mobile */
        gap: 15px;
        text-align: center;
    }

    #physiot-title {
        font-size: 1.1rem !important; /* Makes the long degree name fit better */
        line-height: 1.4;
        padding: 0 15px;
        text-align: center;
    }

    .tcas-steps { flex-direction: column; gap: 40px; }
    .tcas-line { display: none; }
    .tcas-node { width: 100%; }
    .page-title { font-size: 1.8rem;}
    
    .programs-grid {
        grid-template-columns: 1fr; /* Single column stack */
    }

    .floating-container {
        /* margin-bottom: 50px; */
        background-color: #fff;
        border-radius: 8px; /* Slightly more rounded to match the CE reference */
        box-shadow: 0 15px 45px rgba(0,0,0,0.1);
        position: relative;
        z-index: 10;
        overflow: hidden;
    }

    .program-card {
        padding: 30px 10px;
        border-right: none; /* Vertical Dividers */
        border-bottom: 1px solid #eee; /* Vertical Dividers */
    }

    .program-title-en {
        min-height: auto; /* Removes the fixed height to save vertical space */
        font-size: 0.95rem;
    }

    .tuition-title {
    font-size: 1.8rem;
    }

    .tuition-title-text {
        font-size: 1.8rem;
    }

    .price {
        font-size: 3rem;
    }

    /* Centers the header text specifically for the academics list */
    .header .container {
        text-align: center;
    }

    .career-img-container {
        max-width: 100%;
    }

    #info-career {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}